Part Number Hot Search : 
PTQTP SR162 D1400 NJM360 74LV03D PC1498 4570A LT536
Product Description
Full Text Search
 

To Download TDC-GP22 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  acam - messelectronic g mbh is now member of the ams g roup the technical content of th is acam - messelectronic document is still valid. contact information: headquarters: ams ag tobelbaderstrasse 30 8141 unterpremstaetten, austria tel: +43 (0) 3136 500 0 e - mail: ams_sales @ams.com please visit our website at www.ams.com
u ltrasonic - f low - c onverter data sheet tdc - gp 22 march 13 th 2014 document - no: db_gp22_en v0.9 universal 2 - channel time - to - digital converters dedicated to ultrasonic heat & water meters member of the ams group
ufc TDC-GP22 p u b l i s h e d b y a c a m - m e s s e l e c t r o n i c g m b h ?acam-messelectronic gmbh 2014 d i s c l a i m e r / n o t e s preliminary product information describes a product which is not in full production so that full information about the product is not available yet. therefore, acam -messelectronic gmbh (acam) reserves the right to modify this product without notice. th e information provided by this data sheet is believed to be accurate and reliable. however, no responsibility is assumed by acam for its use, nor for any infringements of patents or other rights of third parties that may result from its use. the informatio n is subject to change without notice and is provided as is without warranty of any kind (expressed or implied). all other brand and product names in this document are trademarks or service marks of their respective owners. s u p p o r t / c o n t a c t for a complete listing of direct sales, distributor and sales representative contacts, visit the acam web site at: http://www.acam.de/sales/distributors/ for technical support you can contact the acam support team in the headquarters in germany or the distributor in your country. the contact details of acam in germany are: support@acam.de or by phone +49-7244-74190. member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 1-1 content 1 overview ................................ ................................ ................................ .. 1 - 3 1.1 features ................................ ................................ ............................. 1 - 3 1.2 blockdiagram ................................ ................................ ...................... 1 - 4 1.3 ordering numbers ................................ ................................ ................ 1 - 4 2 characteristics & specifications ................................ ................................ ... 2 - 1 2.1 electrical characteristics ................................ ................................ ....... 2 - 1 2.2 converter specification ................................ ................................ .......... 2 - 4 2.3 timings ................................ ................................ .............................. 2 - 6 2.4 pin description ................................ ................................ .................... 2 - 9 2.5 package drawings ................................ ................................ .............. 2 - 11 2.6 power supply ................................ ................................ ..................... 2 - 14 3 registers & communication ................................ ................................ ......... 3 - 1 3.1 configuration registe rs ................................ ................................ .......... 3 - 1 3.2 read registers ................................ ................................ ................... 3 - 14 3.3 eeprom ................................ ................................ ........................... 3 - 18 3.4 spi - interface ................................ ................................ ..................... 3 - 19 4 converter frontend ................................ ................................ .................... 4 - 1 4.1 tdc - measurement mode 1 ................................ ................................ .. 4 - 1 4.2 tdc - measurement mode 2 ................................ ................................ .. 4 - 9 4.3 analog input section ................................ ................................ ........... 4 - 16 4.4 first wave mode ................................ ................................ ............... 4 - 17 4.5 temperature measurement ................................ ................................ .. 4 - 23 5 details and special functions ................................ ................................ ....... 5 - 1 5.1 oscillator ................................ ................................ ............................ 5 - 1 5.2 fire pulse generator ................................ ................................ ............. 5 - 3 5.3 fast initialization ................................ ................................ .................. 5 - 7 5.4 noise unit ................................ ................................ .......................... 5 - 7 5.5 emc measures ................................ ................................ .................... 5 - 8 6 applications ................................ ................................ .............................. 6 - 1 6.1 ultrasonic heat meter ................................ ................................ .......... 6 - 1 7 miscellaneous ................................ ................................ ........................... 7 - 1 7.1 bug report ................................ ................................ ......................... 7 - 1 7.2 last changes ................................ ................................ ...................... 7 - 2 member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 1-2 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 1-3 1 overview tdc- gp22 is next generations upgrade for tdc -gp21. it is a 100% pin- to -pin and functional compatible upgrade of tdc-gp21, with an extended functionality. especially the new first-wave detection capability makes the TDC-GP22 perfectly suited for ultrasonic water meters with their high dynamics. the programmable offset range of the comparator is increased to 35 mv and the offset is automatically set back to zero after the first wave detection. measuring the relative pulse width of the first wave gives the user an indication of the strength of the received signal. this can be used for adopting the system to long-term signal attenuation or for bubble detection. the multi-hit data processing and data read-out is simplified compared to tdc-gp21. all in all, the TDC-GP22 is a further improvement and simplification for the design of ultrasonic heat meters and a necessary step for compact ultrasonic water meters. 1.1 features measurement mode 2 ? 1 channel with typ. 90 ps resolution ? double resolution mode with 45 ps, quad resolution mode with 22 ps resolutio n ? measurement range 700 ns to 4 ms ? 3-fold multihit capability with automatic processing of all 3 data analog input circuit ? chopper-stabilized low-offset comparator, programmable, 35 mv ? first-wave detection: offset set zero automatically after first wave, hit selection relative to first wave ? first-wave pulse-width measurement for signal monitoring and bubble detection ? integrated analog switches for input selection ? external circuit is reduced to 2 resistors and 2 capacitors temperature measurement unit ? 2 or 4 sensors, pt500/pt1000 or higher ? schmitt trigger integrated ? 16 -bit eff. with external schmitt trigger, 17.5-bit eff. with integrated low noise schmitt trigger ? ultra low current (0.08 a when measuring every 30 seconds) special functions ? fire pulse generator, up to 127 pulses ? trigger to rising and/or falling edge ? precise stop enable by windowing ? low-power 32 khz oscillator (500 na) ? clock calibration unit ? 7x32 bit eeprom measurement mode 1 ? 2 channels with typ. 90 ps resolution ? channel double resolution with typ. 45 ps ? range 3.5 ns (0 ns) to 2.5 s ? 20 ns pulse-pair resolution, 4-fold multihit member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 1-4 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de ? up to 500 000 measurements per second in measurement mode 1 general ? 4-wire spi interface ? 500 khz continuous data rate max. ? i/o voltage 2.5 v to 3.6 v ? core voltage 2.5 v to 3.6 v ? temperature range C 40 c to +125 c ? qfn 32 p ackage 1.2 blockdiagram 1.3 ordering numbers part# package pa ckage qty; carrier order number TDC-GP22 qfn32 5000/3000; t&r mnr 1950 TDC-GP22 qfn32 490; tray mnr 1949 gp22-eva-kit system 1; box mnr 1951 this product is rohs compliant and does not contain any pb. member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 2-1 2 characteristics & specifications 2.1 electrical characteristics absolute maximum ratings supply voltage v cc vs. gnd - 0.3 to 4.0 v v io vs. gnd - 0.3 to 4.0 v v in - 0.5 to v cc + 0.5 v storage temperature (t stg ) - 55 to 150 c esd rating (hbm), each pin > 2 kv junction temperature (t j ) max.125 c recommended operating conditions symbol parameter conditions min typ max unit v cc core supply voltage 1 v io = v cc 2.5 3.6 v v io i/o supply voltage 2.5 3.6 v t ri normal input rising time 200 ns t fa normal input falling time 200 ns t ri schmitt trigger rising time 5 ms t fa schmitt trigger falling time 5 ms t a ambient temperature t j must not exceed 125c - 40 125 c r th(j - a) thermal resistance junction - ambient 28 k/w 1 including the oscillator pins xin, xout, clk32in, clk32out member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 2-2 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de dc characteristics (v io = v cc = 3.0 v, t j = -40 to +85c) symbol parameter conditions min typ max unit i 32 current 32 khz i cc + i io , only 32 khz oscillator running 1.0 a i hs current 4 m h z oscillator v cc = v io = 3.6 v = 3.0 v off 200 130 < 1 a a na i tmu current time measuring unit only during active time measurement 4 ma i ddq quiescent current all clocks off, @ 85 c < 0.1 a i o operating current tof_ up/down, 1/s temperature average, pt1000, 1/30s 1.1 0.15 a v oh high level output voltage i oh = tbd ma v io =min. 0.8v io v v ol low level output voltage i ol = tbd ma, v io =min 0.2v io v v ih high level input voltage lvttl level, v io = max. 0.7v io v v il low level input voltage lvttl level, v io = min. 0.3v io v v th high level schmitt trigger voltage 0.7vio v v tl low level schmitt trigger voltage 0.3v io v v h schmitt trigger hysteresis 0.28 v member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 2-3 terminal capacitance symbol terminal condition rated value unit min. typ. max. c i digital input measured @ v cc = v io , f = 1 mhz, t a = 25c 7 pf c o digital output c io bidirectional 9 pt ports t.b.d. analog in t.b.d. analog frontend symbol terminal condition rated value unit min. typ. max. comparator input offset voltage (chopper stabilized) < 1 2 mv r dson(as) switch - on resistance of analog switches at stop1/stop2 inputs 200 ohm r dson(fire) switch - on resistance of fire_up, fire_down output buffers symmetrical ou t puts, rdson(high) = rdson(low) 4 ohm i fire output current fire_up, fire_down output buffers 48 ma eeprom symbol terminal condition minimum value unit data retention @ 85c normal 10 years with error correction practically endless member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 2-4 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 2.2 converter specification time measuring unit (v io = v cc = 3.0 v, t j = 25c) symbol terminal condition rated value unit min. typ. max. lsb resolution (bin - size) measurement mode 1 & 2: double_res = 0 double_res = 1 90 45 ps measurement mode 2: quad_res = 1 22 ps standard deviation measurement mode 1 double_res = 0 delay = 200n s delay = 1 s double_res = 1 delay = 200n s 45 72 35 ps standard deviation measurement mode 2 double_res = 0 delay = 2s delay = 100s double_res = 1 delay = 2s delay = 100s quad_res = 1 delay = 2s delay = 100s 54 70 50 62 39 62 ps t m measurement range measurement mode 1 3.5 ns 2.4 s =26224 *lsb measurement mode 2 7 00 ns 4 ms inl integral non - linearity < 0.1 lsb dnl differential non - linearity < 0.8 lsb member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 2-5 figure 2-1 relative variation of un -calibrated least significant bit with temperature and supply voltage, reference 3.0v/25c temperature measuring unit 1 symbol terminal internal schmitt t rigger external schmitt t rigger 2 unit pt500 pt1000 pt500 pt1000 resolution rms 17.5 17.5 16.0 16.0 bit snr 105 105 96 96 db absolute gain 3 0.9912 0.9931 0.9960 0.9979 3.6 v 0.9923 0.9940 0.9962 0.9980 absolute gain vs. v io 3 3.0 v 0.9912 0.9931 0.9960 0.9979 2.5 v 0.9895 0.9915 0.9956 0.9979 gain - drift vs. v io 0,25 0.23 0.06 0.04 %/v 0.80 0.90 1.00 1.10 1.20 1.30 1.40 -25 -5 15 35 55 75 95 lsb / (lsb @ 25 c, 3.0 v) temperature [ c] 3.6 v 3.0 v 2.5 v member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 2-6 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de max. gain error (@ d ? = 100 k) 0,05% 0,05% 0,02% < 0.01% gain - drift vs. temp 0.022 0.017 0.012 0.0082 %/10 k gain - drift vs. vio 0,08 %/v initial zero offset < 20 <10 < 20 < 10 mk offset drift vs. temp < 0.05 < 0.03 < 0,012 < 0.0082 mk/ c psrr >100 db 1 all values measured at vio = vcc = 3.0 v, cload = 100 nf for pt1000 and 200 nf for pt500 (c0g-type) 2 measured with external 74ahc14 schmitt trigger 3 compared to an ideal gain of 1 2.3 timings at vcc = 3.0 v 0.3 v, ambient temperature -40 c to +85 c unless otherwise specified oscillator symbol parameter min. typ. max. unit clk32 32 khz reference oscillator 32,768 khz t 32st 32 khz oscillator start - up time after power - up 250 ms clkhs high - speed reference oscillator 2 4 8 mhz t oszst oscillator start - up time with ceramic resonator 100 s t oszst oscillator start - up time with crystal oscillator 3 ms note: it is strongly recommended to use a ceramic oscillator. exactly because a quartz needs much longer to settle than a ceramic oscillator. this costs a lot current, but using a quartz oscillator has no advantage. member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 2-7 serial interface symbol parameter max. @ v io = unit 2.5 v 3.3 v f clk serial clock frequency 15 20 mhz symbol parameter min. @ v io = unit 2.5 v 3.3 v t pwh serial clock, pulse width high 30 25 ns t pwl serial clock, pulse width low 30 25 ns t sussn ssn enable to valid latch clock 40 10 ns t pwssn ssn pulse width between write cycles 50 40 ns t hssn ssn hold time after sclk falling 40 25 ns t sud data set - up time prior to sclk falling 5 5 ns t hd data hold time before sclk falling 5 5 ns symbol parameter max. @ v io = unit 2.5 v 3.3 v t vd data valid after sclk rising 20 16 ns serial interface (spi compatible, clock phase bit =1, clock polarity bit =0): figure 2-2 spi write t sussn t pwh t pwl t pwssn t sud t hd msb lsb ssn sck si t hssn member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 2-8 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de figure 2-3 spi read disable timings figure 2-4 disable timings spec description measurement mode 1 measurement mode 2 t s - en enable setup time 0 ns 0 ns t sh - en enable hold time 1.5 ns 3.0 ns reset timings figure 2-5 reset timings spec description typ. min t ph reset pulse width 50 ns t rfs time after rising edge of reset pulse before further communication 200 ns time after rising edge of reset pulse before analog section is ready 500 s t sussn t pwh t pwl t pwssn t sud t hd msb 6 lsb ssn sck si t vd msb msb-1 1 lsb opcode data 1 so stop en_stop no pass pass t s-en stop en_stop no pass pass t sh-en member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 2-9 2.4 pin description figure 2-6 tdc - gp22 pinout no. name description buffer type value if not used 1 xin oscillator driver in gnd 2 xout oscillator driver out 3 vio i/o C supply voltage 4 gnd ground 5 fire_up f ire pulse generator output 1 48 ma 6 fire_dow n f ire pulse generator output 2 48 ma 7 fire_in diagnostics output gnd 8 intn interrupt flag 4 ma low active 9 ssn slave select low active 10 sck clock serial interface 11 si data input serial interface 1 8 9 16 17 24 25 32 pt1 pt2 vio gnd pt3 pt4 loadt senset xin xout vio gnd fire_up fire_down fire_in intn ssn sck si so rstn vcc clk32out clk32in en_start start stop1 vcc gnd stop2 en_stop1 en_stop2 7 gp22 1105a member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 2- 10 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de no. name description buffer type value if not used 12 so data output serial interface 4 ma tristate 13 rstn reset input low active 14 vcc core supply voltage 15 clk32out output 32 khz clock generator n. c. 16 clk32in input 32 khz clock generator gnd 17 senset sense input temperature measurement schmitt trigger gnd 18 loadt load output temperature measurement 24 ma n.c. 19 pt4* port 4 temperature measurement > 96 ma open drain 20 pt3* port 3 temperature measurement > 96 ma open drain 21 gnd ground 22 vio i/o C supply voltage 23 pt2* port 2 temperature measurement > 96 ma open drain 24 pt1* port 1 temperature measurement > 96 ma open drain 25 en_stop2 enable pin stop input 2 high active vio 26 en_stop1 enable pin stop input 1 high active vio 27 stop2 stop input 2 gnd 28 gnd ground 29 vcc core supply voltage 30 stop1 stop input 1 gnd 31 start start input 32 en_start enable pin start input high active vio * r dson temperature ports: typ. 1.8 @ 3.0 v member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 2- 11 2.5 package drawings figure 2-7 qfn-32 package outline, 5 x 5 x 0.9 mm3, 0.5 mm lead pitch caution: center pad, 3.70 * 3.70 mm2, is internally connected to gnd. no wires other than gnd are allowed underneath. it is not necessary to connect the center pad to gnd. suitable socket: plastronics 32qn50s15050d member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 2- 12 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de landing pattern: figure 2-8 thermal resistance: roughly 28 k/w (value just for reference). environmental: the package is rohs compliant and does not contain any pb. moisture sensitive level (msl) based on jedec 020 moisture sensitivity level definition the tdc -gp22 is classified as msl 1. soldering temperature profile the temperature profile for infrared reflow furnace (in which the temperature is the resins surface temperature) should be maintained within the range described below. member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 2- 13 figure 2-9 soldering profile member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 2- 14 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de maximum temperature the maximum temperature requirement for the resin surface, given 260oc as the peak temperature of the package bodys surface, is that the resin surface temperature must not exceed 250oc for more than 10 seconds. this temperature should be kept as low as possible to reduce the load caused by thermal stress on the package, which is why soldering for short periods only is recommended. in addition to using a suitable temperature profile, we also recommend that you check carefully to confirm good soldering results. date code: yywwa: yy = year, ww = week, a = assembly site code 2.6 power supply supply voltage TDC-GP22 is a high end mixed analog/digital device. to reach full performance of the chip a good power supply is mandatory. it should be high capacitive and of low inductance. the TDC-GP22 provides two pairs of power supply terminals: vio - i/o supply voltage vcc - core supply voltage figure 2- 10 both voltages should be applied with low series resistance from the same source. on the chip there are connected, but a separate external connection is recommended for good measurement quality. all ground pins should be connected to a ground plane on the member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 2- 15 printed circuit board. vio and vcc should be provided by a battery or fixed linear vol tage regulator. do not use switched regulators to avoid disturb ances caused by the i/o supply. v io and v cc are connected internally on the chip. the resistance between bot h is in the range of several ohms. however, v io is connected to the pads with significantly lower impedance and therefore can provide this better than vcc. the measurement quality of a time- to -digital converter depends on a good power supply. the chip sees mainly pulsed current and therefore a sufficient bypassing is mandatory: vcc 47 to 100 f (minimum 22 f) vio 100 f (minimum 22 f) the supply voltage should be provided through analog regulators. we strongly recommend not to use switch mode power supplies. current consumption the current consumption is the sum from different parties (all data for vio = vcc = 3.0v): i ddq < 5 na typ.@3.0v, 25c quiescent current, no 32 khz oscillator running i 32 typ. 1.0 a standby current with active 32 khz oscillator (gp22 waiting for command). i hs typ. 130 a/s * (active runtime) current into the high speed oscillator at 3.0 v vio. example: in ultrasonic flow - meters the high - speed oscillator is on for about 2ms only. the average current consumption is 130 a/s * 2 ms = 0.26 a i tmu typ. 4 ma/s * (active measuring time) current into the time measuring unit, in measurement mode 1 t he time measuring unit is active for the start - stop time interval plus the calibration time interval of 2 periods of the refe rence clock per measurement. in measurement mode 2 the time measuring unit is on for average 4 periods of the reference clock per measurement, two for the time measurement and two for calibration. example: with 10 measurements per second in measurement mod e 2 and a 4 mhz reference clock the time measuring unit is active for member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 2- 16 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de only about 10 s. the avera ge current is 4 ma/s * 10 s = 0.040 a. i t typ. 2.5 as * measure rate the current for a full temperature measurement is typ.2.5as. in heat - meters the temperature is measured typically once every 30 seconds. the average current is about 0.085 a i ana typ. 0.8 ma current consu m ption of the integrated analog part of tdc - gp22 during a time - of - flight (tof) measurement. the analog part is active for a durati on of 250 s + tof. i total 2.3 a in a typical ultrasonic heat me ter application, the flow is measured twice per second. the temperature is measured every 30 seconds. typical current consumption of the complete flow and temperature measuring unit, including the analog part, the transducers and pt sensors. member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 3-1 3 registers & communication 3.1 configuration registers the TDC-GP22 has 7 configuration registers with 32 bit. the upper 24 bit are used for configuration and are write only. they are used to setup the tdc -gp22 operating mode. the lowest 8 bit can be used e.g. as an id and can be read back. for communication test please write to register 1 and read back the highest 8 bit from address 5. note: the write registers of TDC-GP22 are fully upwards compatible with tdc-gp21. in addition, the formerly unused bits 30, 31 in register 3 activate new functionality. especially with bit 30 the first wave mode is switched on and the parameter bits delval2 and delval3 in registers 3 and 4 get a second meaning. for proper work of TDC-GP22, a power-up reset via pin or spi command is necessary after the power-up of the circuit. 3.1.1 alphanumeric listing of configuration parameters table 3-1: configuration parameters parameter register bits default value anz_fake 0 15 0 anz_fire [3:0] [6:4] 0 6 28 - 31 8 - 10 2 anz_per_calres 0 22,23 0 anz_port 0 17 1 calibrate 0 13 1 con_fire 5 28 - 31 0 curr32k 1 15 0 cycle_temp 6 18,19 0 cycle_tof 6 16,17 0 da_korr 6 25 - 28 0 delrel1 3 8 - 13 0 member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 3-2 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de parameter register bits default value delrel2 3 14 - 19 0 delrel3 3 20 - 25 0 delval1 2 8 - 23 0 delval2 3 8 - 23 0 delval3 4 8 - 23 0 dis_phas e shift 5 27 0 dis_pw 4 16 0 div_clkhs 0 20,21 0 div_fire 0 24 - 27 2 double_res 6 12 0 edge_fw 4 15 0 en_analog 6 31 0 en_autocalc_mb2 3 31 0 en_err_val 3 29 0 en_f ast _i nit 1 23 0 en_first_wave 3 30 0 en_int [2:0] [3] 2 6 29 - 31 21 1 en_startnoise 5 28 0 fireo_def 6 14 0 hit1 1 24 - 27 5 hit2 1 28 - 31 5 h itin 1 1 16 - 18 0 hitin 2 1 19 - 21 0 hz60 6 15 0 id0 0 0 - 7 0 id1 1 0 - 7 0 id2 2 0 - 7 0 id3 3 0 - 7 0 id4 4 0 - 7 0 id5 5 0 - 7 0 member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 3-3 parameter register bits default value id6 6 0 - 7 0 messb2 0 11 1 neg_start 0 8 0 neg_stop_temp 6 30 0 neg_stop1 0 9 0 neg_stop2 0 10 0 no_cal_auto 0 12 0 offs 4 8 - 12 0 offsrng1 4 13 0 offsrng2 4 14 0 phfire 5 8 - 23 0 quad_res 6 13 0 repeat_fire 5 24 - 26 0 rfedge1 2 27 0 rfedge2 2 28 0 sel_eclk_tmp 0 14 1 sel_start_fire 1 14 0 sel_timo_mb2 3 27,28 3 sel_tsto1 1 8 - 10 0 sel_tsto2 1 11 - 13 0 start_clkhs [1:0] [2] 0 6 18,19 20 1 tcycle 0 16 0 temp_portdir 6 11 0 tw2 6 22,23 0 member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 3-4 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 3.1.2 list of configuration registers bit number ? 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 p arameter ? param1 k.d. default value ? 1 1 0 0 1 0 1 0 1 0 k.d. = keep default values register 0 (address 0): 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 - 0 anz_fire [3:0] div_fire id0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 1 0 0 1 1 0 1 0 0 0 0 parameter description settings anz_fire [3:0] sets number of pulses generated by f ire pulse generator . additional 3 bits are set in register 6. for values anz_fire > 15 the phase setting (phfire) can not be used. 0 = off 1 = 1 pulse 2 = 2 pulses 127 = 127 pulses div_fire sets predivider for internal clock signal of f ire pulse generator 0 = not permitted 1 = divided by 2 2 = divided by 3 3.= divided by 4 15 = divided by 16 anz_per_calre s sets number of periods used for calibrating the ceramic resonator 0 = 2 periods = 61.035 s 1 = 4 periods = 122.07 s 2 = 8 periods = 244.14 s 3 = 16 periods = 488.281 s div_clkhs sets predivider for clkhs 0 = divided by 1 1 = divided by 2 2 = divided by 4 3 = divided by 4 (also) start_clkhs[1:0] defines the time interval the chip waits after switching on the oscillator before making a measurement. note: the highest bit to adjust start_clks is located in register 6, bit 20. this has to be set to 1 for settling times of 2.44 ms and 0 = oscillator off 1 = os cillator continuously on 2 = settling time 480 s 3 = settling time 1.46 ms 4 = settling time 2.44 ms 5 to 7 = settling time 5.14 ms member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 3-5 5.14 ms. anz_port sets number of ports used for temperature measurement 0 = 2 temperature ports (pt1 and pt2) 1 = 4 temperature ports tcycle sets cycle time for temperature measurement 0 = 128 s cycle time @ 4 mhz 1 = 512 s cycle time @ 4 mhz (recommended) anz_fake number of dummy cycles at the beginning of a temperature measurement 0 = 2 fake measurements 1 = 7 fake measurements sel_eclk_tmp select reference signal for internal cycle clock for temperature measurement 0 = use 32.768 khz as cycle clock 1 = use 128 * clkhs as period for cycle clock (32 s with 4 mh z high speed clock signal ) calibrate enables/disables calibration calculation in the alu 0 = calculation of calibrated results off (allowed only in measurement mode 1) 1 = calculation of calibrated results on (recommended) no_cal_auto enables/disables auto - calibration run in the tdc 0 = auto - calibration after measurement 1 = auto - calibration disabled messb2 switch to measurement mode 2 0 = measurement mode 1 1 = measurement mode 2 neg_stop2 negation stop 2 input 0 = non - inverted input signal C rising edge 1 = inverted input signal C falling edge neg_stop1 negation stop 1 input 0 = non - inverted input signal C rising edge 1 = inverted input signal C falling edge neg_start negation start input 0 = non - inverted input signal C rising edge 1 = inverted input signal C falling edge id0 free bits, e.g. to be used as identification or version number member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 3-6 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de register 1 (address 1): 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 - 0 hit2 hit1 hitin2 hitin1 sel_tsto2 sel_tsto1 id1 0 1 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 parameter description settings hit2 defines operator for alu data post - processing measurement mode 1: hit1 - hit2 measurement mode 2: hit2 - hit1 measurement mode 1: 0 = start 1 = 1. stop ch1 2 = 2. stop ch1 3 = 3. stop ch1 4 = 4. stop ch1 5 = no action 6 = cal1 ch1 7 = cal2 ch1 9 = 1. stop ch2 a = 2. stop ch2 b = 3. stop ch2 c = 4. stop ch2 measurement mode 2: 2 = 1. stop ch1 3 = 2. stop ch1 4 = 3. stop ch1 hit1 defines operator for alu data post - processing measurement mode 1 : hit1 - hit2 measurement mode 2 : hit2 - hit1 measurement mode 1: 0 = start 1 = 1. stop ch1 2 = 2. stop ch1 3 = 3. stop ch1 4 = 4. stop ch1 5 = no action 6 = cal1 ch1 7 = cal2 ch1 9 = 1. stop ch2 a = 2. stop ch2 b = 3. stop ch2 c = 4. stop ch2 measurement mode 2: 1 = start en_fast_init enables fast init operation 0 = fast init mode disabled 1 = fast init mode enabled hitin2 number of expected hits on channel 2 0 = stop channel 2 disabled 1 = 1 hit 2 = 2 hits 3 = 3 hits 4 = 4 hits 5 to 7 = not permitted hitin1 number of expected hits on channel 1 0 = stop channel 1 disabled 1 = 1 hit member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 3-7 2 = 2 hits 3 = 3 hits 4 = 4 hits 5 to 7 = not permitted curr32k low current option for 32 khz oscillator. basically there is no need to use high current option (1). low current (0) also guarantees oscillation. 0 = low current (recommended) 1 = high current (gp2 compatibility) sel_start_fire f ire pulse is used as tdc start. the start input is disabled. 0 = tdc - gp2 behavior 1 = use fire as start sel_tsto2 defines functionality of en_start pin. besides the gp2 functionality this pin can act as output for various signals. if sel_tsto2 > 0 then en_start = high internally. 0 = gp2 functionality, high level enables the start pin. 1 = start_tdc output 2 = stop1 tdc output 3 = stop2 tdc output 4 = stop temperature measurement output 5 = 0 indicates tof_down being active, 1 indicates tof_up being active 6 = n.c. 7 = 4 khz (32 khz/8) clock sel_tsto1 defines functionality of fire_in pin. besides the gp2 functionality this p in can act as output for various signals. if sel_tsto1 >1 the fire_in is co n nected to gnd internally. 0 = gp2 functionality, fire_in input for sing - around 1 = start_tdc output 2 = stop1 tdc output 3 = stop2 tdc output 4 = start temperature measurement output 5 = en_stop by delval output 6 = comparator out 7 = 32 khz clock id1 free bits, e.g. to be used as identification or version number register 2 (address 2): 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 - 0 en_int [2:0] delval1 id2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 3-8 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de parameter description settings en_int [2:0] activates interrupt sources wired by or. additional bit in register 6 (see there, too) bit 31 = timeout interrupt enable bit 30 = end hits interrupt enable bit 29 = alu interrupt enable reg6, bit21 = end of eeprom action rfedge2 edge sensitivity channel 2 0 = rising or falling edge 1 = rising and falling edge rfedge1 edge sensitivity channel 1 0 = rising or falling edge 1 = rising and falling edge delval1 delay value for internal stop enable unit, hit 1 channel 1. fixed point number with 14 integer and 5 fractional digits in multiples of t ref delval1 = 0 to 16383.96875 mandatory: i f en_analog = 0 then set delval1 = 0 id2 free bits, e.g. to be used as identification or version number register 3 (address 3) with en_first_wave = 0: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 - 0 delval2 id3 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 3-9 register 3 (address 3) with en_first_wave = 1: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 - 0 delrel3 delrel2 delrel1 id3 parameter description settings en_autocalc_mb2 only in measurement mode 2: automatic calculation of all enabled hits. the sum of the results is written to read register 4. 0 = disabled 1 = enabled en_err_val timeout forces alu to write h ffffffff into the output register 0 = disabled 1 = enabled en_first_wave enables the automatic first hit detection. in case this bit is set registers 3 and 4 get a new meaning 0 = disabled 1 = enabled sel_timo_mb2 select predivider for timeout in measurement mode 2 0 = 64 s 1 = 256 s 2 = 1024 s 3 = 4096 s recommended @ 4 mhz clkhs delrel3 sets the number of the periods after the first hit for the 3rd stop 5 to 63 delrel3 > delrel2 delrel2 sets the number of the periods after the first hit for the 2nd stop 4 to 63 delrel2 > delrel1 delrel1 sets the number of the periods after the first hit for the 1st stop 3 to 63 delval2 delay value for internal stop enable unit, hit 2 channel 1. fixed point number with 14 integer and 5 fractional digits in multiples of t ref delval 2 = 0 to 16383.96875 mandatory: i f en_analog = 0 then set delval2 = 0 id3 free bits, e.g. to be used as identification or version number register 4 (address 4) with en_first_wave = 0: member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 3- 10 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 - 0 k.d. delval3 id4 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 register 4 (address 4) with en_first_wave = 1: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 - 0 k.d. offs id4 parameter description settings delval3 delay value for internal stop enable unit, hit 3 channel 1. fixed point number with 14 integer and 5 fractional digits in multiples of t ref delval3 = 0 to 16383.96875 mandatory: i f en_analog = 0 then set delval3 = 0 dis_pw disable pulse width measurement 0 = enable pulse width measurement 1 = disable pulse width measurement edge_fw sets the edge sensitivity for the first wave. with a negative offset it is reasonable to trigger on the falling edge of the first wave. 0 = rising edge 1 = falling edge offsrng2 additional offset shift by + 20 mv 0 = off 1 = active offsrng1 additional offset shift by - 20 mv 0 = off 1 = active offs 2s complement number setting the offset shift in 1 mv steps 0 = 0 mv 1 = +1 mv ... 15 = +15 mv 16 = - 16 mv 17 = - 15 mv ... 30 = - 2 mv 31 = - 1 mv id4 free bits, e.g. to be used as identification or version number note: when switching to first wave mode make sure that the highest 5 bits have the default values. especially bit 29 has to be 1. member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 3- 11 register 5 (address 5): 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 - 0 phfire id5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 parameter description settings conf_fire output configuration for pulse generator 3b 011 is not allowed bit 31 = 1: fire_both (inverts fire_down) bit 30 = 1: enable output fire_up bit 29 = 1: enable output fire_down en_startnoise enables additional noise for start channel 1 = switch on noise unit dis_phaseshift phas e noise unit. improves statisti cs and should be enabled if start pulse generation is derived from the gp2 reference clock (e. g. with f ire pulse generator ). 1 = disables phase noise 0 = enables phase noise unit repeat_fire number of pulse sequence repetition for "quasi - sing - around " 0 = no signal repetition 1 = 1 signal repetition 2 = 2 signal repetition ... 7 = 7 signal repetition phfire enables phase reversing for each pulse of a sequence of up to 15 possible pulses . phfire[0..14] are available. 0 = no inversion , phase jump high - low 1 = inversion , phase jump low - high bit 23 = 0 (mandatory) id5 free bits, e.g. to be used as identification or version number register 6 (address 6): member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 3- 12 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 - 0 id6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 parameter description settings en_analog activates the analog part for the ultrasonic flow measurement is. if active, this section is powered only for the duration of the measurement to save current. stop1 and stop2 are analog inputs now and automatically selected by the internal multiplexer. 0 = stop1 and stop2 are digital inputs (tdc - gp2 compatibility) 1 = the analog section is used. mandatory: i f en_analog = 0 then set delval1 = delval2 = delval3 = 0 neg_stop_temp inverts the senset input signal. this is mandatory when the internal comparator is used instead of the external one like in tdc - gp2 0 = external 74hc14 is used (tdc - gp2 compatibility) 1 = internal schmitt trigger is used da_korr sets comparator offset from - 8 mv to +7 mv. 2s complement 7 = 7 mv 15 = - 1 mv 6 = 6 mv 14 = - 2 mv ... 1 = 1 mv 9 = - 7 mv 0 = 0 mv 8 = - 8 mv tw2 timer to charge up the capacitor of the recommend rc network when the internal analog part is used. charge time: 0 = 90 s 1 = 120 s 2 = 150 s 3 = 300 s, recommended setting en_int [3] additional interrupt source. see also register 2 for the l o wer 3 bits of en_int. the various sources are wired by an or. an eeprom action, e.g . eeprom_compare, is manag ed by the tdc - gp21 and especially the eeprom w r ite may last up to 130ms. indicating the end will be helpful. 1 = end of eeprom action start_clkhs[2] highest bit to set the settling time for the high speed oscillator. the lower bits are set in register 0, bit 18 and 1 9 . 0 = off 1 = continously on 2 = 480 s delay 3 = 1.46 ms 4 = 2.44 ms 5 to 7 = 5.14 ms member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 3- 13 cycle_temp selects timer for triggering the second temperature measurement in multiples of 50/60hz 0 = 1 1 = 1.5 2 = 2 3 = 2.5 cycle_tof selects timer for triggering the second tof measurement in multiples of 50/60hz 0 = 1 1 = 1.5 2 = 2 3 = 2.5 hz60 tdc - gp21 can make complete up and down flow measurement and also two temperature measurements in series. the time interval between 2 measurements is based on 50 or 60 hz. 0 = 50 hz base, 20 ms 1 = 60 hz base, 16.67ms fireo_def specifies the default level of the inactive fire buffer. example: if fire_up is active then the fire_down buffer is connected to the default level. setting 1 is mandatory when using the integrated analog section. 0 = high - z (as in gp2) 1 = low quad_res option to improve the resolution by factor 4 from 90 ps to 22 ps. can be used only in measurement mode 2. 0 = off (tdc - gp2 mode) 1 = on double_res doubles the resolution from 90 ps to 45 ps. in measurement mode 1 this option limits the number of stop inputs to one (stop1) 0 = off (tdc - gp2 mode) 1 = on temp_portdir ports for temperature measurement are measured in the opposite order. 0 = pt1 > pt2 > pt3 > pt4 1 = pt4 > pt3 > pt2 > pt1 anz_fire[6:4] highe st 3 bits of the number of f ire pulse s. see also register 0. if anz_fire > 15 then phfire is no longer active. 0 = off 1 = 1 pulse 2 = 2 pulses 127 = 127 pulses id6 free bits, e.g. to be used as identification or version number member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 3- 14 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 3.2 read registers the result and status registers can be read by means of opcode hb x. the opcode is followed by 4, 2 or 1 bytes, depending on the address. the id register bits in the configuration registers can be read back by means of opcode hb7. this opcode is followed by 7 bytes in the order id0, id1 ... id6, each byte with the msb first. table 3-2: read registers adr symbol bits description 0 res_0 32 measurement result 1, fixed - point number with 16 integer and 16 fractional digits 2 15 2 0 , 2 - 1 2 - 16 1 res_1 32 measurement result 2, fixed - point number with 16 integer an d 16 fractional digits 2 res_2 32 measurement result 3, fixed - point number with 16 integer and 16 fractional digits 3 res_3 32 measurement result 4, fixed - point number with 16 integer and 16 fractional digits 4 stat 16 15 14 13 12 11 10 9 8 - 6 5 - 3 2 - 0 eeprom_eq_creg eeprom_ded eeprom_error error short error open timeout precounter timeout tdc # of hits ch 2 # of hits ch 1 alu_ op_ ptr 5 reg_1 8 content of highest 8 b its of write register 1, to be used for testing the communication 8 pw1st 8 pulse width 1st wave compared to measured hits, fixed point with 1 bit integer 3.2.1 result registers the data structure and the occupancy of the result registers depend on the operation mode and whether calibrated or non-calibrated data are stored. several cases must be distinguished: only in measurement mode 1 negative results are possible. in measurement mode 2 only positive results are possible, given as unsigned numbers. member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 3- 15 a non-calibrated measure is possible only in measurement mode 1. in measurement mode 1 with calibrated data (alu) the time intervals that have to be measured can not exceed twice the period of the calibration clock. when measuring bigger time intervals an alu - overflow will occur and hffffffff is written in the appropriate result register. a. measurement mode 1 with calibrated data (calibrate = 1) the results are given in multiples of the internal reference clock (= external reference clock divided by 1, 2 or 4 (div_clkhs)). calibrated data are 32 bit fixed point numbers with 16 integer bits and 16 fractional bits. any calibrated result covers therefore 1 result register. the serial output begins with the highest bit (2 15 ) and ends with the lowest one (2 - 16 ). the numbers are available in complements of 2. time = res_x * t ref * 2 div_clkhs = res_x * t ref * n , with n = 1, 2 or 4 time < 2 * t ref * 2 div_clkhs b. measurement mode 1 without calibration (calibrate = 0) non-calibrated data are of the type signed integer and are stored as a 16 bit value in the high word of the result registers. the bits of the low word are set to zero. the result is represented as number of lsb and is available in complements of 2. time = res_x * lsb ~ res_x * 90 ps c. measurement mode 2 in measurement mode 2 the TDC-GP22 only supports calibrated measurement. the results are given in multiples of the internal reference clock (= external reference clock divided by 1, 2 or 4 (div_clkhs)). calibrated data are 32 bit fixed point numbers with 16 integer bits and 16 fractional bits. any calibrated result covers therefore 1 result register. the serial output begins with the highest bit (2 15 ) and ends with the lowest one (2 - 16 ). the numbers are available in complements of 2. time = res_x * t ref * 2 div_clkhs = res_x * t ref * n , with n = 1, 2 or 4 d. temperature measurement discharge time in the same format as in c., measurement mode 2. member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 3- 16 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de the ratio of the discharge times equal the ratio of resistance: r t = r ref * ? t / ? ref 3.2.2 status register table 3-3: status registers bits name description values 2 C 0 alu_op_ptr alu o peration p ointer . pointer to the result register . see description below 5 C 3 # of hits ch 1 number of hits registered on channel 1 8 C 6 # of hits ch 2 number of hits registered on channel 2 9 timeout tdc indicates an overflow of the tdc unit 1 = overflow 10 timeout precounter indicates an overflow of the 14 bit precounter in mr 2 1 = overflow 11 error open indicates an open sensor at temperature measurement 1 = open 12 error short indicates a shorted sensor at temperature measurement 1 = short 13 eeprom_error single error in eeprom which has been corrected 1 = error 14 eeprom_ded double error detection. a multiple error has been dete cted wh ich can not be corrected. 1 = multiple error 15 eeprom_eq_creg indicates whether the content of the configuration registers equals the eeprom 1 = equal alu operation pointer description: the alu operation pointer is stored in bits 0-2 of the status register (range of 0x00 to 0x03) and provides an index to one of the 4 results registers (r es_0 to res_3) as follows: ? when the en_autocalc_mb2 parameter is set to 0, and therefore autocalculation is off, the alu operation pointer is set to the next free result register that will be used by the alu for its next tdc cycle. this occurs once a tdc measurement is performed. therefore after a tdc measurement alu_op_ptr minus 1 will point to the alu result. ? when en_autocalc_mb2 is 1 (autocalculation on) and once a tdc measurement is performed the alu operation pointer is set to the result register that contains the sum of the hit calculations stored in res_0 to res_2. this calculation does not member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 3- 17 increase the alu operation pointer. of course, if the number of hits you expect is less than 4 (3 results + 1 start), then not all of the registers from r es_0 to res_ 2 will be used in the sum. 3.2.3 pw1st register this register holds a 8-bit fixed point number with 1 integer and 7 fractional digits. pw1st gives the ratio of the width of the first half wave (at a given offset) compared to the half period of the received signal. see section 4.4 for further details. data range: 0 to 1.99219 (with edge_fw = rising edge and negative offset the ratio is > 1). example 1 : en_autocalc_mb2 = 0 ff after sending an init o pcode: alu_op_ptr == 0x00 tdc measurement performed, alu performs one calculation. alu_op_ptr == 0x01 calculation result is in register 0 (alu_op_ptr - 1) by writing to configuration register 1 the alu performs a second calculation alu_op_ptr == 0x02 calcul ation result is in register 1 (alu_op_ptr - 1) by writing to configuration register 1 the alu performs a third calculation alu_op_ptr == 0x03 calculation result is in register 2 (alu_op_ptr - 1) example 2 : en_autocalc_mb2 = on three hits are configured by the user tdc m easurement p erformed alu_op_ptr == 0x03 automatic calculation of the sum of r es_ 0 + r es_ 1 + r es_ 2 calculation result is in register 3 (alu_op_ptr) member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 3- 18 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 3.3 eeprom the TDC-GP22 has a 7x32 bit eeprom. this eeprom can be used to store the configuration data together with the id or version number. only the following three actions are possible: ? write configuration register content into the eeprom ? transfer the eeprom content into the configuration registers ? compare the configuration registers content with the eeprom content besides the id it is not possible to read back the eeprom. this gives customers the possibility to program the chips by themselves and prohibit other to read back the co nfiguration. for verification it is possible to compare the configuration register may be compare with the eeprom. bit eeprom_eq_creg in the status register indicates whether the content is equal or not. the eeprom has an internal error correction (hamming code). it is possible ? to detect and correct single bit errors, ? to detect multi-bit errors without correction errors are indicated in the status register, bits eeprom_error (single bit) and eeprom_ded (double error detection). *****with each read access/compare to the eeprom the error bit is checked. in case a single bit error is detected a refresh cycle is started automatically and the data is restored. the data retention of the eeprom is > 10 years @ 85 c without single or multiple errors. with regular compare_eeprom commands (e.g. once per month) the data retention can be extended unlimited. important note : if values are to be stored in the eeprom it is mandatory to ensure that no measurement is running (neither tof nor temperature nor calibration measurements ). during measurement a write access to the eeprom is not permitted. the write access to the eeprom takes about 300 ms. with no consideration, the eeprom may be written with incorrect values. it may even happ en that adjustment values are overwritten which prevents proper operation of the tdc. member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 3- 19 3.4 spi-interface the serial interface is compatible with the 4-wire spi standard. it needs the serialselectnot (ssn) and can not operated as 3-wire interface. ssn - slave select sck - spi clock si - spi data in so - spi data out the TDC-GP22 does only support the following spi mode (motorola specification) * : clock phase bit = 1 clock polarity bit = 0 sck starts with low, data take over is with the falling edge of sck. the timings are shown in section 2.3. the interrupt pin is set back to intn = 1 if: ? ssn goes low ? or, in case ssn is already low, with the first rising edge of sck. ssn as reset the serialselectnot (ssn) line is the high-active reset for the serial interface. after ssn is set to low different operations can be addressed, not depending on the status of the interface before the reset. note: it is mandatory to set the ssn C line to high-state for at least 50 ns between each read-/write sequence. * there is no common spi specification, especially for phase & polarity. some microcontroller may need a different setting, e.g. msp430 run with clock phase = clock polarity = 0 o pc odes table 3-4: opcodes hex msb lsb description followed by h8x 1 0 0 0 0 a2 a1 a0 write into address a 24 bit or 32 bit data hbx 1 0 1 1 0 a2 a1 a0 read from address a 8, 16 or 32 bit data hb7 1 0 1 1 0 1 1 1 read id bit 56 bit ids member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 3- 20 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de hex msb lsb description followed by hb8 1 0 1 1 1 0 0 0 read pw1st 8bit hc0 1 1 0 0 0 0 0 0 write configuration registers into eeprom hf0 1 1 1 1 0 0 0 0 transfer eeprom content into configuration registers hc 6 1 1 0 0 0 1 1 0 compare configuration registers with eeprom h70 0 1 1 1 0 0 0 0 init h50 0 1 0 1 0 0 0 0 power on reset h01 0 0 0 0 0 0 0 1 start_tof h02 0 0 0 0 0 0 1 0 start_temp h03 0 0 0 0 0 0 1 1 start_cal_resonator h04 0 0 0 0 0 1 0 0 start_cal_tdc h05 0 0 0 0 0 1 0 1 start_tof_restart h06 0 0 0 0 0 1 1 0 start_temp_restart the transfer starts with the msb and is finished sending the lsb. the transfer is done bytewise. data transfer can be stopped after each byte, sending a low -high-low on the ssn line. example: h80 + 3 bytes will write configuration register 0 in the tdc-gp2 compatible mode. h80 + 4 bytes will write configuration register 0 including ido (tdc -gp22 only). it is not possible to do incremental writing. each register must be addressed separately. 3.4.1 op code explanations 1. hc0, hf0, hc6 all refer to eeprom operations. those may last up 130 ms, especially the eeprom write. therefore, the en_int bit 3 in register 6 indicates the end of the eeprom operation. this can be used to adjust microprocessor actions . member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 3- 21 2. h01, start_tof : triggers a sequence for a single time- of -flight measurement. first, the 4 mhz oscillator is switched on. after the delay set to settle the oscillator (start_clkhs), the comparator and the reference voltage are switched on. the receiver capacitor is charged up th vref while inactive fire buffer is pulled down to gnd. after the delay set to charge up the capacitor (tw2), the fire buffer sends the fire pulses. after the delay set in delval the tdc stop channel is open. at the end of the measurement the analog section and the 4 mhz are switched off and the current consumption drops down to near zero. the interrupt is set, pin intn = low. 3. h05, start_tof_restart: this opcode runs the start_tof sequence twice, in up and down direction as it is typical in ultrasonic flow meters. the interrupt is set, pin intn = low, when the time measurement for each direction is finished. so, for one start_tof_restart command the microprocessor sees two interrupts and has to read twice. the time interval between the up and down measurement is set by configuration parameter cycle_tof in multiples of 50 hz or 60 hz. the right selection of the delay between the two measurements suppresses 50/60 hz noise. cycle_tof factor hz60 = 0(50hz) hz60 = 1(60hz) 0 1 20 ms 16.67 ms 1 1.5 30 ms 25.00 ms 2 2 40 ms 33.33 ms 3 2.5 50 ms 41.67 ms ? h02, start_temp: triggers a single temperature measurement sequence. it begins with the fake measurements (anz_fake) on port pt0. then it measures ports pt0 > pt1 > pt2 > pt4. if temp_portdir is set one then the sequence of ports is inverted, starting with the fake measurements at port pt4. ? h06, start_temp_restart: this opcode runs the start_temp sequence twice. the time interval between the up and down measurement is set by configuration parameter cycle_temp in multiples of 50 hz or 60 hz. the right selection of the delay between the two measurements suppresses 50/60 hz noise. cycle_temp factor hz60 = 0 (50hz) hz60 = 1 (60hz) 0 1 20 ms 16.67 ms 1 1.5 30 ms 25.00 ms 2 2 40 ms 33.33 ms 3 2.5 50 ms 41.67 ms member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 3- 22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de ? h03, start_cal_resonator: triggers a calibration measurement of the high speed oscilator. the tdc measures a time interval between 61 s and 488 s, specified in anz_per_calres. the end of the measurement is indicated by the interrupt. the result, in multiples or the high speed clock period, is stored in result register 0. dividing this by the theoretical value gives the correction factor. ? h04, start_cal_tdc: this command starts a measurement of 2 periods of the reference clock. it is used to update the calibration raw data. typically, the chip is configured for auto-calibration and this command is not necessary. 3.4.2 spi sample figure 3- 1: sample scope picture for sequence init h70 and start_cal_tdc = h04 member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 4-1 4 converter frontend 4.1 tdc - measurement mode 1 4.1.1 general description ? measurement range from 3.5 ns to 2.4 s (0 to 2.4 s between stop channels) ? 2 stop channels referring to one start channel each of typ. 90 ps resolution ? 1 stop channel referring to one start channel with typ. 45 ps resolution ? 20 ns pulse pair resolution ? 4-fold multihit capability for each stop channel ? selectable rising/falling edge sensitivity for each channel ? enable pins for windowing functionality ? the possibility to arbitrarily measure all events against each other ? typical application: laser tof, rf tof, ate digital tdcs use internal propagation delays of signals through gates to measure time intervals with very high precision. figure 5 clarifies the prin cipal structure of such an absolute-time tdc. intelligent circuit structures, redundant circuitry and special methods of layout on the chip make it possible to reconstruct the exact number of gates passed by the signal. the maximum possible resolution strongly depends on the maximum possible gate propagation delay on the chip. figure 4.1 the measuring unit is triggered by a start signal and stopped by a stop signal. based on the position of the ring oscillator and the coarse counter the time interval between start an d stop is calculated with a 20 bit measurement range. the bin size (lsb) is typically 90 ps at 3.3 v and 25 c ambient temperature. the rms noise is about 60 ps (0.7 lsb). the gate propagation delay times strongly depend on member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 4-2 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de temperature and voltage. usually this is solved doing a calibration. during such a calibration the tdc measures 1 and 2 periods of the reference clock. the measurement range is limited by size of the counter: t yy = bin x 26224 ~ 90 ps x 26224 = 2.4 s time (condition) description t ph 2,5 ns (min.) minimum pulse width t pl 2,5 ns (min.) minimum pulse width t ss 3.5 ns ns (min) 2.4 s (max.) start to stop t rr 20 ns (typ.) rising edge to rising edge t ff 20 ns (typ.) t va 1.24s uncalibrated 4.25s calibrated last hit to data valid t xx no timing limits t yy 2.4 s (max) max. measurement range = 26224 * lsb input circuitry each input separately can be set to be sensitive to rising or falling edge or both edges. this is done in register 0, bits 8 to 10. (neg_start, neg_stop1, neg_stop2) and register 2, bit 27 & 28, rfedgex. furthermore all start/stop-inputs support a high active enable pin. 4.1.2 measurement flow configuration at the beginning the TDC-GP22 has to be configured. the main settings for measurement mode 1 are: a. select measurement mode 1 set register 0, bit 11, messb2 = 0. figure 4.2 member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 4-3 register 6, bit 12, double_res = 1 selects double resolution. with this bit set the resolution is typ. 45 ps instead of 90 ps, but only one stop channel is available. b. select the reference clock (see also section 5.1) register 0, bits 18 & 19 and register 6, bit 20, start_clkhs defines the switch-on behavior of the high-speed clock. if only the 32 khz is used it should be 0. if only the high- sp eed clock is used it should be 1 (continuously on). register 0, bits 20 & 21, div_clkhs sets an additional internal divider for the reference clock (1, 2 or 4). this is important for calibrated measurements in measurement mode 1 because the alu works correctly only if 2*t ref (intern) is bigger than the maximum time interval to be measured. otherwise the alu output is hffffffff. make also sure that 2*t ref (intern) < 2.4 s to avoid a timeout during calibration. c. set the number of expected hits in register 1, bits 16 to 18 and 19 to 21, hitin1 and hitin2 the user has to define the number of hits the TDC-GP22 has to wait for. a maximum of 4 on each channel is possible. the TDC-GP22 measures until the set number of hits is registered or a timeout occurs. d. select calibration as the bin size varies with temperature and voltage the TDC-GP22 alu can internally calibrate the results. this option is switched on by setting register 0, bit13, calibrate = 1. it is recommended to do this. figure 4.3 member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 4-4 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de for the calibration the tdc measures 1 and 2 cycles of the reference clock. the two data are stored as cal1 and cal2. there are two ways to update the calibration data cal1 and cal2: - separate calibration by sending opcode start_cal_tdc via the spi interface - automatic update by setting register 0, bit 12, no_cal_a uto = 0. in most applications this will be the preferred setting. e. define alu data processing while the tdc unit can measure up to 4 hits on each channel the user is free in his definition what the alu shall calculate. the settings are done in register 1, bits 16 to 19 and 20 to 23, hit1 and hit2. both parameters can be set to: 0 = start 1 = 1. stop ch1 9 = 1. stop ch2 2 = 2. stop ch1 a = 2. stop ch2 3 = 3. stop ch1 b = 3. stop ch2 4 = 4. stop ch1 c = 4. stop ch2 6 = cal1 ch1 7 = cal2 ch1 the alu calculates h it 1 - h it 2. in case calibration is active the alu does the full calibration calculation (except when reading the calibration values. in this case the alu writes the cal1/cal2 ra w data to the output register). ( ) examples: reg1 = h 01xxxx - 1st stop ch1 - start reg1 = h 2bxxxx - 3rd stop ch2 - 2nd stop ch1 reg1 = h06xxxx - cal1 member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 4-5 figure 4.4 f. select input sensitivity in register 2, bits 27 & 28, rfedge1 and rfedge2, the user can select whether the stop inputs are sensitive to either rising or falling edges (rfedge = 0) or to both rising and falling edges (rfedge = 1). in register 0, bits 8 to 10 the user can add an internal inverter to ea ch input, start, stop1 and stop2. with rfedge = 0 this is the same as rising edge (neg_x = 0) or falling edge (neg_x = 1). g. interrupt behavior the interrupt pin 8, int can have different sources. they are selected in register 2, bits 29 to 31, en_int and register 6, bit 21. reg. 2 bit 29 = 1 alu ready reg. 2 bit 30 = 1 the set number of hits is there reg. 2 bit 31 = 1 timeout of the tdc unit reg. 6 bit 21 = 1 end of eeprom action the different options are wired by or to enable more than one source. the first rising edge of sck resets the intn pin (interrupt). after the configuration the user has to initialize the tdc - gp22 by sending opcode init so that the tdc accepts start and stop hits. member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 4-6 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de measurement after an initialization the tdc unit will start with the first pulse on the start input. it will run until: ? the set number of hits has been seen (maximum 4 on both stop channels in mode 1) ? or until a timeout occurs at the end of the measurement range (at about 2.4 s in mode 1). the time measurement raw data are internally stored. the number of hits can be seen from the status register, bits 3 to 8. in case calibration is active the tdc now m easures one and two periods of the internal reference clock (t ref * 1, 2 or 4). the calibration raw data cal1 and cal2 are also internally stored. figure 4.5 data processing at the end of the measurement the alu starts to process the data according to the hit1, hit2 settings and transfers the result to the output register. in case calibration is off the alu transfers the 16 bit raw data to the output register. with calibration the alu calculates according to 3.1.1.d and transfers the 32 bit fixed point number to the output register. the alu can be switched off configuring hit1 = hit2 = 5. the time it takes the alu depends on whether calibration is on or not and the supply voltage. member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 4-7 table 4.1: alu timings un - calibrated (disable auto - cal.) calibrated predivider 2.5 v 1.56 s 3.0 s 0 4.58 s 1 7.58 s 2 3.0 v 1.24 s 2.75 s 0 4.25 s 1 7.26 s 2 3.6 v 1.0 s 2.54 s 0 4.0 s 1 7.0 s 2 as soon as the data is available from the output register the interrupt flag is set (assumed that the alu interrupt is enabled, see reg. 2, en_int). further the load pointer of the output register is increased by 1 and points to the next free memory. the actual position of the load pointer can be seen in the status register, bits 0 to 2. reading data now the user can read the data sending the opcode 10110adr. with the next 16 clock cycles (un-calibrated data) or 32 clock cycles (calibrated data) the TDC-GP22 will send the result, beginning with the most significant bit (msb). the first rising edge of sck resets the intn pin (interrupt). a. un-calibrated data format: 16 bit signed integer in complements of 2. 1bin = uncalibrated gate delay is about 90 ps at 3.3 v and 25 c. time = res_x x 90 ps b. calibrated data format: 32 bit fixed-point number in complements of 2. given in multiples of the reference clock. time = res_x * t ref * n, with n = 1, 2 or 4 example: configuration ... write reg1=h014400 4 hits on channel 1, calculate 1st stop - start ... initialize ... while(check interrupt flag) write reg1=h024400 calculate 2nd - start wait(4.6 s) write reg1=h034400 calculate 3rd - start wait(4.6 s) write reg1=h044400 calculate 4th - start wait(4.6 s) now all hit data are a vailable from registers 0 to 3. the load pointer value is 4. member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 4-8 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de the measured time interval may not exceed otherwise the alu will go into overflow and will write the data hffffffff to the output register. the configuration of the alu allows only one hit calculation at the time. in case more than one hit has been measured it is necessary to write new commands to hit1/hit2 to instruct the alu for calculating the other hits. after writing to hit1/hit2 it is ne cessary to wait for minimum t.b.d. s (calibrated data) or t.b.d. ns (un -calibrated data) before reading or writing again to hit1/hit2. reading calibration raw data the calibration data are not addressed directly after the calibration measurement but after the next regular measurement, before the next init. at the end the TDC-GP22 has to be initialized again to be ready for the next measurement. this is done by sending the opcode init so that the tdc accepts new start and stop hits. source code example: // -------------------------------------------------------------------------- // 1st measurement plus calibratio n data readout gp22_send_1byte (bus_type, init); // wait for int slot_x wait_for_interrupt(bus_type); // first regular measurement (to readout calibration raw data) result = gp22_read_n_bytes(bus_type, 4 ,0xb0 ,0x00 ,16); // readout the new calibration data from result register adr 0x01 gp22_wr_config_reg(bus_type, 0x81, 0x67490000); d iff_cal2_cal1 = gp22_read_n_bytes(bus_type, 4, 0xb0 ,0x01 ,16); // -------------------------------------------------------------------------- member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 4-9 4.2 tdc - measurement mode 2 4.2.1 general description ? 1 stop channels referring to one start channel ? typical 22 ps / 45 ps / 90 ps resolution ? measurement range from 700 ns to 4 ms @ 4 mhz ? 2 x t ref pulse pair resolution ? 3-fold multihit capability, full-automated calculation ? selectable rising/falling edge sensitivity ? integrated programmable windowing for each single stop with 10 ns precision ? typical application: ultrasonic flow & heat meter digital tdcs use internal propagation delays of signals through gates to measure time intervals with very high precision (see also measurement mode 1, section 4). in measurement mode 2 the maximum time interval is extended using a pre-divider. the resolution in lsb remains unchanged by that. in this mode the high -speed unit of the tdc does not measure the whole time interval but only time intervals from start and stop to the next rising edge of the reference clock (fine-counts). in between the fine-counts the tdc counts the number of periods of the reference clock (coarse -count). figure 4.6 the gp22 converter front end section achieves a quantization bin of 90 ps (lsb) where vcc = 3.3 v and the ambient temperature is at 25 c. rms noise accounts for 60 ps (0.7 lsb) of this same result. as gate propagation delay is used for precision interval measurement it is important to consider that this delay time is directly affected by both vcc and temperature. therefore, using measurement mode 2, a calibration is required and is done automatically with the right configuration. during calibration the tdc measures one and two periods of the 4 mhz reference clock. member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 4- 10 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de the calibrated result does not depend on temperature or supply voltage. the measurement range is limited by size of the coarse counter: t yy = t ref x 2 14 = 4.1ms @ 4mhz the time interval between start and stop is calculated with a 26 bit measurement range. time (condition) description t ph 2,5 ns (min.) minimum pulse width t pl 2,5 ns (min.) minimum pulse width t ss 2*t ref start to stop @ dis_phaseshift = 1 t rr 2*t ref rising edge to rising edge t ff 2*t ref falling edge to falling edge t va 4.6 s (max.) alu start to data valid t yy 4 ms (max) max. measurement range input circuitry each input separately can be set to be sensitive to rising or falling edg e. this is done in register 0, bits 0 to 2. (neg_start, neg_stop1). further all start/stop-inputs support a high active enable pin. note: in case the start-stop interval is less than the lower limit tzz the tdc will ignore more and more events the smaller it is. in no case there will be wrong results. 4.2.2 measurement flow figure 4.7 member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 4- 11 configuration at the beginning the TDC-GP22 has to be configured. the main settings for measurement mode 2 are: a. select measurement mode 2 setting register 0, b it 11, messb2 = 1 b. select the reference clock (see also section 5.1) in measurement mode 2 the TDC-GP22 needs the high-speed clock for the time measurement. in case of low-power applications this clock can be switched of in between measurements. the a 32.768 khz clock is necessary for the timing control during the oscillator power-on. register 0, bits 18 & 19, start_clkhs defines the switch-on behavior of the high-speed clock. if only the high-speed clock is used this is be set to 1(continuously on). in case both oscillators are used for current saving reasons this should be set to 2 for cer amic oscillators and to 3 for quartz oscillators. register 0, bits 20 & 21, div_clkhs sets an additional internal divider for the reference clock (1, 2 or 4). the choice has an influence on the minimum time interval t min = 2 * t ref * 2 div_clkhs and the maximum time interval t max = 2 14 * t ref * 2 div_clkhs further, it is necessary that 2 * t ref * 2 div_clkhs < 2.4 s. otherwise the alu will go into an overflow during calibration and write hffffffff as output data. please note: figure 4.8 member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 4- 12 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de the resulting clock after the predivider has to be in the allowed range of 2 mhz to 8 mhz in single and double resolution and from 2 mhz ... 6 mhz in quad resolution. c. set the number of expected hits in register 1 , b its 16 to 18, hitin1 the user has to define the number of hits the tdc - gp22 has to wait for. a maximum of 3 on channel 1 is possible. the number hitin1 always has to be higher by 1 than the number of expected hits. the reason is that the start is also counted as a hit. the TDC-GP22 measures until the set number of hits is registered or a timeout occurs. register 1 , bits 19 to 21, hitin2 have to be set to 0. d. select calibration the calibration is switched on by setting register 0, bit13, calibrate = 1. it is mandatory to do this. for the calibration the tdc measures 1 and 2 cycles of the reference clock. the two data are stored as cal1 and cal2. there are two ways to update the calibration data cal1 and cal2: ? separate calibration by sending opcode start_cal_tdc via the spi interface ? automatic update by setting register 0, bit 12, no_auto_cal = 0. in most applications this will be the preferred setting. e. define alu data processing with en_autocalc_mb2 = 1 the TDC-GP22 calculates all set hits automatically. in addition, the sum of the results is calculated, too, and written into read register res_3. this simplifies the communication compared to tdc-gp21 as it is no longer necessary to re -write register 1. with en_autocalc_mb2 disabled the alu calculates only one hit at once. the settings are done in register 1, bits 24 to 27 and 28 to 31, hit1 and hit2. the start pulse is internally handled like a stop pulse because of the special measuring method in measurement mode 2 . example: 2 stop pulses are expected: hitin1 = 3 , hitin2 = 0 member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 4- 13 reg1 = h21xxxx = calculate 1st stop ch1 -start reg1 = h31xxxx = calculate 2nd stop ch1 -start reg1 = h41xxxx = calculate 3rd stop ch1 -start the alu calculates the time interval as: ( ) f. select input sensitivity in register 2, bits 27 & 28, rfedge1 and rfedge2, the user can select whether the stop inputs are sensitive to either rising or falling edges (rfedge = 0) or to both rising and falling edges (rfedge = 1). in register 0, b its 8 to 10 the user can add an internal inverter to each input, start, stop1 and stop2. with rfedge = 0 this is the same as rising edge (neg_x = 0) or falling edge (neg_x = 1). g. interrupt behavior the int pin can have various sources, to be selected in regi ster 2, bits 21 to 23, en_int, and register 6 bit 21 en_int. en_int = no bits set no interrupt source reg2 b it 29 alu ready reg2 b it 30 the set number of hits is there reg2 b it 31 timeout of the tdc unit reg6 b it 21 eeprom action has finished the different options are wired by or. the first rising edge of sck resets the intn pin (interrupt). after the configuration the user has to initialize the tdc -gp22 by sending opcode init so that the tdc accepts start and stop hits. measurement after an initialization the tdc unit will start with the first pulse on the start input. it will run until: member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 4- 14 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de ? the set number of hits has been seen (maximum 3 on channel 1 in measurement mode 2 ) ? or until a timeout occurs. the timeout can be programmed in multiples of the reference clock setting r eg . 3, bits 27 & 28, sel_timo_mb2. at 4 mhz the values are: sel_timo_mb2 (@ 4 mhz, div_clkhs = 0) = 0 = 64 s = 1 = 256 s = 2 = 1024 s = 3 = 4096 s recommended at the end of the time measurement the tdc measures 2 periods of the reference clock for calibration. data processing at the end of the measurement the alu starts to process the data according to the hit1, hit2 settings and transfers the result to the output register. the alu calculates according to 4.2.2.e and transfers the 32 bit fixed point number to the output register. the time it takes the alu depends on the supply voltage to be calculated: table 4-2: alu timings 2.5 v 3.0 v 3.6 v first event (1 hit) 3.7 s 3.3 s 3.1 s as soon as the data is available from the output register the interrupt flag is set (assumed that the alu interrupt is enabled, see reg. 2, en_int). further the load pointer of the output register is increased by 1 and points to the next free memory. the actual position of the load pointer can be seen in the status register, bits 0 to 2. reading data now the user can read the data sending the opcode 10110adr. with the next 32 cycles (calibrated data) the TDC-GP22 will send the result, beginning with the main significant bit (msb). member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 4- 15 the 32 bit fixed-point numbers in complements of 2 represent the time interval in multiples of the reference clock. time = res_x * t ref * 2 div_clkhs now all hit data are available from registers 0 to 2. the load pointer value is 3. at the end the TDC-GP22 has to be initialized again to be ready for the next measurement. this is done by sending the opcode init so that the tdc accepts new start and stop hits. the first rising edge of sck resets the intn pin (interrupt). 4.2.3 stop masking the TDC-GP22 can set time-based masking windows for each of the 3 hits on stop1 input when no hits are accepted. the masking refers to the start event and has an accuracy of less than 10 ns. the internal enable unit is connected to the external enable pin by a logical and. the external e nable pin must be set to 1 to use the internal masking unit. the configuration settings are made in registers 2 to 4, delval1, delval2 and delval3: ? delval1 delval3 are fixed point numbers with 14 bit integer and 5 bit fractional digits, in multiples of the internal reference clock delay min = delvalx / 2 5 * t ref * 2 div_clkhs ? the minimum mask size is 3 clock cycles ? the mask values must have an ascending order. each mask value must be 3 clock cycles bigger than the previous value it is mandatory that if not all registers are used the mask values that are not required are set to 0. when all delval regist ers are set to 0, the complete unit is disabled. example: 4 m h z reference, div_clkhs = 1 delval1 = h3200 1st stop not accepted before 200 s after start (12800/32 * 250 ns * 2 1 = 200 s) delval2 = h3300 2nd stop not accepted before 204 s after start (13056/32 * 250 ns * 2 1 = 204 s) delval 3 = h3400 3rd stop not accepted before 208 s after start (13312/32 * 250 ns * 2 1 = 208 s) member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 4- 16 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 4.3 analog input section TDC-GP22 has an additional analog input section which can be used alternatively to the pure digital inputs. especially the design of ultrasonic flow and heat meters is greatly simplified by this option. the external circuit of the ultrasonic part is reduced to just two resistors and capacitors additional to the piezo transducers. the ultrasonic signals will be packages of sinusoidal oscillat ions with several 100 mv amplitude. the signals are coupled to the inputs by means of a high pass filter as the comparator can not handle gnd as threshold. the threshold of the comparator is set to 1/3 v cc . an analog multiplexer selects the input according to the active measurement direction. the comparator is chopper stabilized to guarantee a low offset voltage in the range of < 2 mv. this is mandatory for a good measurement quality. the input offset voltage of the comparator is frequently corrected by an internal chopper circuit. if temperature or supply voltage changes over time, the offset voltage is automatically adapted and holds at < 2 mv. all elements are controlled by the TDC-GP22 control unit. they are powered only during the measurement to keep down the power consumption . a measurement sequence, triggered by command start_tof_restart looks like the following procedure, starting with the up flow measurement: ? the 4 mhz oscillator is switched on. the chip waits for the programmed delay to give enough time for the oscillator to reach the full amplitude. ? the comparator, the reference voltage and the analog switches get powered. ? the capacitor of the transmitting path (stop1) is connected to gnd. ? the fire down buffer (fire_down) is connected to gnd. ? the capacitor of the receiving path (stop2) is charged up to vref. the tdc waits the delay set in tw2. ? the analog switch selects stop2 input as input to the comparator. ? fire_up is selected as tdc start signal. ? the set number of pulses is sent through the fire up buffer, pin fire_up. ? the analog signal at stop2 passes the comparator converted to a digital signal that is connected to the stop input of the tdc unit. ? when the delay of the stop masking unit (delval) expired the tdc is ready to measure. it can measure up to 3 stops. member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 4- 17 figure 4.9 ? at the end of the measurement the control unit switches off the comparator, the reference the analog switches and the 4 mhz. the current is reduced to close zero. the interrupt flag is set. ? the control unit waits a period, given in multiples of 50hz/60hz. during this the processor has to read the results. ? after the delay the same procedure is started but in the opposite direction. 4.3.1 offset setting the offset of the comparator can be set in steps of 1 mv from -8mv to +7 mv by means of parameter da_korr, bits 25 to 28 in register 6. da_korr is set as 2s complement. additionally, with first wave mode an additional offset of 35 mv can be set for the first wave detection. see section 4.4 for details. 4.4 first wave mode the major improvement of TDC-GP22 is the implementation of the first wave mode. it is based on measurement mode 2 with the analog section being used. the offset is member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 4- 18 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de figure 4 - 10: typical error by hig h fluid dynamics controlled automatically to detect the first wave safely and to refer the final tof measurement relative to the first wave. additionally, the width of the first half wave is compared to the half wave of the first tof measurement. the ratio can be used as indicator for the signal strength. thanks to the offset noise are suppressed and a time out indicates no water in the tube. the following list summarizes the options: ? save first wave detection, allows high dynamic applications like water meters ? higher dynamics allow use of 2 mhz or 4 mhz transducers ? upon the application of transducers with 2 - 4 mhz , it is necessary to choose a larger interval in the choice of the three waves ( e.g. 4 - 6 - 8 or 4 - 7 - 10 ) , t o take account of pulse pair resolution. ( > 2 * t ref + 200 ns ) ? even reverse flow can be handled (very helpful e.g. with water meters) ? pulse width measurement, allows to analyze the strength of the receive signal and to track the trigger level or to send an alarm. ? offset for noise suppression, allows to indicate an empty tube. figure 4-10 illustrates the importance of save first hit detection in flow meters with high dynamic range like water meters. with a fixed stop masking (fixed delval values) it is not possible to recognize if the time- of - flight changes more than the period of the sound signal. there are several reasons that the change in tof is more than a period. an important one is the influence of temperature which changes the speed of ultrasound. for slow systems like heat meters this might be corrected by intelligent software. but for high dynamic systems like water meters with flow also in the opposite direction this method will no longer be appropriate. the trend towards higher transducer frequencies like 2 mhz and 4 mhz is another reason for having a system that can handle intrinsically changes bigger than a signal period. member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 4- 19 there is still another source of getting wrong measurements. dirt deposition on the transducers, spool piece mirrors and housing will lead to signal damping e.g. from 400 mv to < 80 mv. figure 4-11 shows how this will affect the first wave detection at a given, fixed offset for the first wave detection. once the first wave amplitude is below the offset level the measurement result will jump by one period. with the tdc- gp22s first wave detection the time - of -flight measurement is related to the first wave and gets independent from temperature and flow. miscalculations due to wrong zero crossing assignment are no longer possible. additionally, the measurement of the width of the first half wave gives the user a chance to monitor the signal quality and to adjust the first wave offset trigger level if necessary. the following figure shows the measurement flow in TDC-GP22 first wave mode. figure 4 - 11: wrong measurement due to signal damping member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 4- 20 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de figure 4-12: first wave mode 1. with the fire pulse generat or the offset for the first wave detection is set to a programmable level. the delval1 stop masking is used for su rprising any noise and it is set just roughly close to the minimum expected time- of -flight. further noise will be suppressed by the comparator offset until the receive signal reaches the amplitude above this offset level. 2. the TDC-GP22 measure the time interval between rising and falling edge of the first wave. then, it automatically sets back the offset to 0 mv. with < 1 mv offset the offset drift of the flow measurement over temperature is minimized. 3. the stop masking for the three time measurements is set by parameters delrel1 t o delrel3, relative to the first wave. e.g. delrel1 = 3 says the 3rd wave after the first wave is measured. 4. the half wave period (hwp) of the first true time measurement is measured as a reference for the first wave. in the example from figure 4-12 this would be the width of the 5st wave. member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 4- 21 the ratio hwp first wave /hwp firsttof is in the range of 0 to 1 , typically less than 1 . the smaller the value the weaker is the receive signal. the information can be used to monitor the flow meter. if there are too many deposits over the years of operation and the signal ration drops e.g. below 0.5 then the second wave can be used as reference in the future. the signal drop might also be caused by bubbles in the water. therefore, an alarm message can be sending in parallel to the operator. 5. TDC-GP22 automatically calculates all three stop event and further calculates the average of the three which will be available from register 4. this way, the communication with the microprocessor is simplified a lot. as soon as the interrupt is set the processor can immediately read all three results or just the average value. there is no need to re- wr ite register 1 like it was with tdc-gp21. 6. in case the spool piece is empty then there will be no stop signal. the offset w ill stay at the level for the first wave detection. this way, noise can not trigger the tdc and the tdc will run into a time-out. in other words: the timeout is an indicator for an empty tube. member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 4- 22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 4.4.1 configuration the relevant configuration parameters are: table 4-3: first wave mode configuration reg bits parameter description 3 30 en_first_wave 1 = switches on the first wave mode, reg3, delval2 and reg4, delval3 get a new meaning. 4 8 - 12 offs 2s complement number setting the offset shift in 1 mv steps 0 = 0 mv 1 = +1 mv ... 15 = +15 mv 16 = - 16 mv 17 = - 15 mv ... 31 = - 1 mv 4 13 offsrng1 1 = additional offset shift by - 20 mv 4 14 offsrng2 1 = additional offset shift by + 20 mv 3 8 - 25 delrel1 to delrel3 stop masking, select the xth wave for time - of - flight measurement. maximum is the 63rd wave. delrel1 ?? ? delrel1 to delrel3 have to be set in ascending order. example: delrel1 = 3, delrel2 = 4, delrel3 = 5 means to measure 3rd, 4th and 5th wave after the first wave 4 16 dis_pw 0 = switch on / 1 = switch off pulse width measurement. the ratio can be read from address 8, register pw1st as an 8 bit fixed point number with one integer bit (range 0 to 1.99). 4 15 edge_fw sets the edge sensitivity for the first wave. with a negative offs et it is reasonable to trigger on the falling edge of the first wave. 0 = rising edge, 1 = falling edge 3 31 en_autocalc_mb2 1 = switch on the automatic calculation of all enabled hits. the sum of the results is written to read measurement result 4 at read register address 3 (=res_3) . member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 4- 23 4.5 temperature measurement especially for heat meter applications the TDC-GP22 has a picostrain based temperature measuring unit that offers high resolution and very low current consumption. the measurement is based on measuring discharge times. therefore, a capacitor is discharged alternately through the sense resistors and the reference resistors. as an improvement compared to tdc-gp2, the TDC-GP22 has the comparator already integrated. fi gure 4.13 the unit has 4 resistor ports, two of them to be used for the temperature sensors for hot water (up) and cold water (down). the other two ports are used for reference resistors. basically, on reference resistor connected to both ports is suffici ent. the temperature sensors should have a minimum resistance of 500 ohm. the cable length should not exceed 3 m. TDC-GP22 can measure 2-wire sensors only. it is not possible to use 4-wire sensors. the precision of the temperature measurement is far within the limits of the standard for heat meters when pt500 or pt1000 are used. in combination with pt500 or pt1000 temperature sensors there is no need for two reference resistors. a typical setup with one fixed reference is shown in figure 4 -14. member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 4- 24 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de the emc protection is a recommendation from experience of acam-messelection gmbh. further information will be shown in section 5.5 emc measures. figure 4.14: pt500 / pt1000 temperature measurement with one reference resistor the temperature measurement is fully automated. it is triggered by the c sending the opcodes start_temp or start_temp_restart. with start_temp_restart the tdc -gp22 measures the temperature twice, with a delay given in multiples of the 50 hz/60 hz period. this will be of help to reduce 50hz/60hz noise. for a measurement, the TDC-GP22 starts with 2 or 8 dummy measurements at port pt1 before it makes the real four measurements in the order pt1 > pt2 > pt3 > pt4. after the 4 measurements have finished the interrupt flag is set. TDC-GP22 has the possibility to inverse the order, making the dummy measurements at port pt4. the four data are found in registers 0 to 3. from res_3/res_1 and res_4/res_2 the microcontroller can calculate the ratio rtemp/rref. by means of a look-up table it can calculate the temperature for the special type of sensor in use. configuration register 0, bit 15, anz_fake sets the number of dummy measurements at the beginning of a temperature measurement. this is necessary to overcome mechan ical effects of the load capacitor. TDC-GP22 pt1 pt2 pt3 pt4 100nf r ref 2 x pt500 / pt1000 loadt senset ?up ?down 1nf 1nf emc protection member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 4- 25 anz_fake = 0 2 dummy measurements anz_fake = 1 7 dummy measurements register 0, bit 16, t cycle sets the cycle time for the temperature measurement. tcycle = 0 128 s cycle time @ 4mhz tcycle = 1 512 s cycle time @ 4mhz register 0, bit 17, anz_port sets the number of ports that will be used. anz_port = 0 2 ports = 1 sensor anz_port = 1 4 ports = 2 sensors register 6, bit 11, temp_portdir sets the order of the port measurements temp_portdir = 0 pt1 > pt2 > pt3 > pt4 temp_portdir = 1 pt4 > pt3 > pt2 > pt1 register 6, bit 15, hz60 sets the base frequency for the delay between the up and down measurements for commands start_tof_restart and start_temp_restart. hz60 = 0 50 hz base hz60 = 1 60 hz base register 6, bits 18, 19, cycle_temp, selects the factor timer for triggering the second temperature measurement in multiples of 50/60hz. cycle_temp = 0 1 = 1 1.5 = 2 2 = 3 2.5 register 6, bit 30, neg_stop_temp inverts this signal at the senset path. this is mandatory when the internal comparator is used. without inversion the unit is compatible to tdc-gp2 operation with an external schmitt trigger neg_stop_temp = 0 no inversion, tdc-gp2 compatible = 1 inversion, mandatory when the internal comparator is used member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 4- 26 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de recommended capacitor values the discharge time should be about 150 s. therefore the capacitor should have the following value: pt500: 220 nf pt1000: 100 nf please set tcycle = 1 to avoid timeout error. recommended capacitor type to get accurate results we recommend capacitor types with very low dc/du. we recommend: c0g types or cfcap series from tayo yuden please do not use x7r or similar capacitors. current consumption by means of the tdc technology the temperature measurement needs an extremely low current, much less than an a/d converter does. a full temperature measurement with 2 sensors, 2 references am pt1000 sensor type, including all calculations takes less than 2.5 as. with one temperature measurement in 30 seconds (typical for heat meters) the average current consumption is 0.08 a only. this is about 50 times less than other solutions. a pt500 sensor doubles the current. note: during temperature measurement the start input has to be enabled. error detection ad ditionally the temperature unit checks the plausibility of the results. it is able to detect a short circuit of the sensor or an open sensor. the TDC-GP22 provides in the relevant output register an error code instead of a measurement value. 1. short circuit between lines: equivalent to a very short time interval (< 8 x t ref = 2 s @ 4 mhz). the tdc- gp22 writes a h0 to the output register of the shorted sensor. 2. broken sensor/short circuit against gnd: equivalent to no stop signal or timeout. the tdc- gp22 writes a hfff fffff into the output register of the open sensor. member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 4- 27 note: due to a bug it is necessary to have sel_timo_mb2 at 2ms to get a correct interrupt indication when 512 s cycle time is selected. figure 4-15: short circuit indication table 4.4: analog specification symbol terminal internal schmitt t rigger e xternal schmitt t rigger 2 unit pt500 pt1000 pt500 pt1000 resolution rms 17.5 17.5 16.0 16.0 bit snr 96 96 db absolute gain 3 0.9912 0.9931 0.9960 0.9979 absolute gain vs. vio 3 (gain factor) 3.6 v 0.9923 0.9940 0.9962 0.9980 3.0 v 0.9912 0.9931 0.9960 0.9979 2.5 v 0.9895 0.9915 0.9956 0.9979 gain - drift vs. vio 0.25 0.23 0.06 0.04 %/v max. gain error (@ d ? = 100 k) 0,05% 0,05% 0,02% < 0.01% gain - drift vs. temp 0.022 0.017 0.012 0.0082 %/10 k TDC-GP22 pt1 pt2 pt3 pt4 33nf r ref loadt senset 3 2 1 1: short circuit between lines: error short 2: short circuit loadt against gnd: error open 3: circuit circuit pt2 against gnd: measurement at pt1 with half the nominal discharge time as sensor is in parallel to rref, result out of reasonable range member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 4- 28 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de gain - drift vs. vio 0,08 %/v initial zero offset < 20 <10 < 20 < 10 mk offset drift vs. temp < 0.05 < 0.03 < 0,012 < 0.0082 mk/ c psrr >100 db 1 all values measured at vio = vcc = 3.0 v, cload = 100 nf for pt1000 and 200 nf for pt500 (c0g-type) 2 measured with external 74ahc14 schmitt trigger 3 compared to an ideal gain of 1 gain error and its mathematical correction the tdc- gp22 temperature measurement is based on acams picostrain technology. here the resistance variation of an rtd is digitized by means of a high accurate time interval measurement. according to that, the schmitt triggers delay time introduces a considerable gain error that results in a gain reduction co mpared to an ideal output value. this gain reduction can be mathematically described as a deviation from an ideal straight line. hence, a simple mathematical correction by adding a correction factor compensates for this deviation from the ideal gain. it is calculated as follows: t corr = t uncorr /gainfactor with t corr : gain corrected temperature result t uncorr : uncorrected temperature result gainfactor: gain correction factor, compensates the deviation from an ideal gain of 1 by means of this compensation, the effect of the schmitt triggers delay time can be reduced to a residual gain error o f 0.05 % of f. s. with the internal schmitt trigger, or even less in combination with an external 74ahc14 schmitt trigger. member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 4- 29 three main parameters have to be considered, to select the correct gain factor: ? base resistance of the temperature sensor (e.g. pt500, pt1000) ? used schmitt trigger (gp22-internal, external 74ahc14) ? gp22 supply voltage the appropriate gain correction factors are provided in table 4 - 3 (absolute gain vs. vio). import note: the gain correction factors for the external schmitt trigger exclusively refer to the 74ahc14 schmitt trigger. other types (e.g. 74hc14) require different gain factors, in order to ensure a correct compensation. according to that, we strongly recommend to use a 74ahc14 as external schmitt trigger. example 1: application with pt1000 sensor, gp22 internal schmitt trigger and 3.0 v supply voltage. according to table 4.3 a gain factor of 0.9931 has to be selected. the gain corrected result is calculated then by the following equation: t corr =t uncorr /0.9931 example 2: application with pt500 sensor, external 74ahc14 schmitt trigger and 3.6 v supply voltage. table 4 - 3 now spec ifies a gain factor of 0.9980. the gain corrected result is calculated as follows: t corr = t uncorr /0.9980 member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 4- 30 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 5-1 5 details and special functions 5.1 oscillator the TDC-GP22 uses up to 2 clock signals depending on the operating mode: ? high-speed clock, typically 4 mhz, for calibration and as a predivider for the tdc measuring unit in measurement mode 2 and for the eeprom ? 32 khz clock signal used for internal timer functions. 5.1.1 high-speed oscillator generally, the TDC-GP22 needs a high-speed clock for calibration. the recommend value is 4 mhz, the possible range is 2 to 8 mhz (2 to 6 mhz in quad_res mode). when running in measurement mode 2 the TDC-GP22 needs the high-speed clock signal also as a part of th e time measuring unit. finally the operations need the high speed clock, too. the oscillator takes an average current of 200 a when running all the time. but as it is needed only during the time measurement, the TDC-GP22 has the capability to control the on -time by itself. the settings are done with parameter start_clkhs. with start_clkhs > 1 the oscillator is switched on after sending opcodes start_tof, start_tof_restart, start_temp and start_temp_restart for the duration of the measurement. a delay between starting the oscillator and starting the measurement guarantees sufficient time for the oscillation to settle at full amplitude. note: it is strongly recommended to use a ceramic oscillator. exactly because a quartz needs much longer to settle than a ceramic oscillator. this costs a lot current, but using a quartz oscillator has no advantage. member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 5-2 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de start_clkhs = 0 oscillator off = 1 oscillator continuously on = 2 the measurement is started with 480 s delay. = 3 same as 2, but with 1.46 ms delay = 4 same as 2, but with 2.44 ms delay = 5 to 7 same as 2, but with 5.14 ms delay the programmable delay guarantees that the oscillator has settled before the measurement starts. for ceramic resonators 480 s will be sufficient. for quartz the necessary delay might reach the maximum of 5.14 ms. by this measure the average current consumption can be drastically reduced. 5.1.2 32.768 khz oscillator the TDC-GP22 needs a 32.768 khz reference for the start-up control of the high-speed clock and the cloc k calibration. it therefore offers an integrated low-power driver. the 32.768 khz oscillator is permanently running and has a current consumption of only about 0.5 a at 3.0 v. the settling time of this oscillator is about 3 s after power -up. the 32.768 khz oscillator cannot be switched off. with an external 32 khz clock from the microprocessor pin clk32in has to be connected to gnd. the low-power clock can be internally forwarded to an output pin to be available for an external microprocessor. the possible settings are: sel_tsto1 = 7: 32 khz output at pin fire_in example: at one tof measurement in an ultrasonic flow meter (forth/back) per second the high - speed oscillato r is active only for about 2 ms. the average current consumption is 130 as * 2 ms = 0.26 a. figure 5.1 figure 5.2 member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 5-3 sel_tsto2 = 7: 4 khz (32 khz/8) output at pin en_start it is also possible to provide an external low-frequency rectangular clock at the clk32out pin (3.6 v max.). figure 5.3 5.1.3 calibrating a ceramic high-speed oscillator using a ceramic oscillator for the 2 to 8 mhz clock will be attractive because it is of low cost and has a fast settling time. unfortunately it has a poor tolerance of 0.3 to 0.5 % and shows a temperature drift. for this reason the TDC-GP22 allows to execute a calibration measurement that allows to compensate this behavior. this measurement is based on the very precise 32.768 khz clock. the TDC-GP22 generates start/stop pulses from the 32.768 khz and measures this time interval with its tdc unit. the result is stored in the result register and the interrupt flag is set. the frequency error of the ceramic resonator can be calculated by the microprocessor. the calibration is configured by setting register 0, anz_per_calres and is started with start_cal_resonator - instruction by the microprocessor. the time interval to be measured is set by anz_per_calres which defines the numbe r of periods of the 32.768 khz clock: anz_per_calres = 0 2 periods = 61.035 s = 1 4 periods = 122.070 s = 2 8 periods = 244.140 s = 3 16 periods = 488.281s the results is given in multiples of the high-speed clock and (divided by 1, 2 or 4 (div_clkhs)) as 32 bit fixed point numbers with 16 integer bits and 16 fractional bits. the microcontroller can compare this measured value to the theoretical value and calculate the correction factor for the frequency. clk32in clk32out external 32khz member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 5-2 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de ( ) note: during clock calibration the start input has to be enabled. example: the system shall work with a 4 mhz resonator. with div_clkhs = 0 and anz_per_ calres = 1 the theoretical result is 122.0703125s/250ns = 488.2812 5 (res_0 = h01e84800). if the ceramic resonator in use is not exactly at 4 mhz but only 3.98 mhz the calibration measurement will show 485,83984375 (res_0 = 1e5d700). the correction factor for the microcontroller is 1.005. source code example: // -------------------------------------------------------------------------- // start calibrate high speed clock cycle // note: it does not work in combination with en_autocalc = 1 gp22_wr_config_ reg(bus_type, 0x83, 0x00000000); // en_autocalc=0 gp22_send_1byte(bus_type, init); gp22_send_1byte(bus_type, start_cal_resonator); // wait for int slot_x wait_for_interrupt(bus_type ); //calculate correction factor (anz_per_calres =1 ) clkhs_freq_corr_fact = 122.070/ gp22_read_n_bytes(bus_type, 4, 0xb0, 0x00, 16) * clkhs_freq; printf(" \ n correction factor for clock = %1.3f \ n", clkhs_freq_corr_fact); clkhs_freq_cal *= clkhs_freq_corr_fact; // calibrated clock freque ncy gp22_wr_config_reg(bus_type, 0x83 , 0x80000000); // en_autocalc=1 // -------------------------------------------------------------------------- member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 5-3 5.1.4 how to use clock calibration a. application this option is dedicated especially to ultrasonic flow and heat meters. in those applications the use of ceramic oscillators shows two main advantages: lower cost and less current consumption. mainly because of the short oscillation start -up time of the ceramic oscillator the operating current can be reduced by several a. referring to 10 years of operation this saves several 100 mah in battery capacitance. there is no negative effect on the resolution when using this option the correct way. b. jitter of the 32 khz clock and consequences the 32 khz clock is very precise in frequency with only a few ppm error. however, the phase jitter is about 3 to 5 ns peak-peak. for this reason also a calibration measurement (start_cal_resonator) has this error. when multiplying a measurement result with the calibration result, the jitter of the calibration is transferred to the result by the ratio calibration measurement time (see anz_per_calres) to measurement time. using a permanently updated calibration value will add a considerable jitter to the measurement result. c. application of this option in ultrasonic flow meters a measurement result is always made of two single time- of -flight measurements in ultrasonic flow meters, with and against the flow direction. the difference between those measurements is a measure for the flow. to avoid an influence of the calibration jitter on this measurement result it is necessary only to use the same calibration for both tof measurements. following this, the difference between the two tof measurements will be free of the jitter of the clock calibration measurement. the clock can be calibrated only between measurements that are not directly subtracted from each other. 5.2 fire pulse generator 5.2.1 general description the fire pulse generator generates a sequence of pulses which is highly programmable in fr equency, phase and number of pulses. the high-speed oscillator frequency divided by the factor selected for div_clkhs is used as the basic frequency. this frequency is internally doubled and can freely be divided by a factor of 2 to 15. it is possible to g enerate 1 to 127 pulses. if maximum 15 pulses are sent the phase for each pulse can be adjusted per member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 5-4 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de register configuration. the fire pulse generator is activated by sending opcode start_tof . the fire pulse maybe used directly for the start of the tdc. the fire pulse generator provides 2 outputs, fire_up and fire_down. the driver strength of each output is 96 ma @ 3.3 v. furthermore, fire_down output signal can be inverted to double the signal amplitude. the outputs can be set individually high-z. alternately, the default level of the inactive buffer can be set to gnd. 5.2.2 configuration number of pulses: anz_fire = 0 switch off fire pulse generator = 1 1 pulse = 2 2 pulses = 127 127 pulses sel_start_fire = 1 fire pulse is used as tdc start fire_default = 0 default level high-z (gp2 compatible) = 1 default level gnd. mandatory if the internal analog circuit and the recommended circuit with external r and c is used. phase: the phase of each pulse can be defined in register 5, phfire[0..14], (mandatory: phfire[15] = 0), if not more than 15 pulses are sent. 0 stands for high -low and 1 for low-high. the pulse sequence begins with the lsb and ends with the msb . it is an easy way to halve the pulse frequency. for that use phfire = h5555 and defining straight number of anz_fire = 14. fire pulse frequency: the input signal fireclk1 for the fire pulse generator is derived from the high speed clock clkhs and the selected value for the high speed clock divider div_clkhs. example: anz_fire = 15 , phfire = h0055 lsb [0], [1], [14] msb member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 5-5 figure 5.3 this signal is internally doubled and divided by div_fire. div_fire = 0 not permitted 1 divided by 2 2 divided by 3 ... ... 15 divided by 16 register 5, bit 19, dis_phaseshift actives the phase shift, which introduces additional noise to improve statistical behavior when averaging. dis_phaseshift = 0 phase shift on dis_phaseshift = 1 phase shift off fireclk2 is used as reference signal for the fire_up / fire_down - signal which is emitted by the output buffers fire_up / fire_down of the fire pulse generator. 1 n clkhs pulse-generator div_clkhs 1 0.5 frequency doubling f fireclk2 f fireclk1 phase- shift fire- generator dis_phaseshift fire_up fire_down phfire conf_fire 3 16 1 m div_fire anz_fire 4 member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 5-6 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de figure 5.4 as shown in figure 16 at least 2 clock periods t fireclk2 are required to send one fire pulse . one for the high phase and one for the low phase of the fire_up/fire_down output signal. driver outputs: the output drivers are configured by setting conf_fire in register 5, bits 29 to 31: conf_fire configures the fire_up and fire_down outputs of the gp22. conf_fire is used to control which of the outputs (fire_up or fire_down) are first fired when the start_tof_restart command is issued. it is also used to individually enable or disable these outputs. only one of the three bits may be set to 1: bit 31 = 1 fire both outputs (fire_up and fire_down) simultaneously. in this case, the fire_down output is an inverted representation of fire_up. bit 30 = 1 enable fire_up output only, or when start_tof_restart is issued, fire this output first. bit 29 = 1 enable fire_down output only, or when start_tof_restart is issued, fire this output first. note: in register 5, bits 16 to 18, repeat_fire originally had been implemented for sing around measuring. please set example: clkhs = 4 mhz, div_clkhs = 1, div_fire = 1 max. frequency of the fire_up / fire_down output signal: member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 5-7 repeat_fire = 0 no repetition 5.3 fast initialization in measurement mode 1 the TDC-GP22 offers the possibility of a fast initialization. activated by setting register 1, bit 15, en_fast_init = 1 the interrupt flag automatically initializes the tdc. so the tdc is already prepared for the next measurement while the data can be read out. this mode is for highest speed applications only. it is most reasonable for un-calibrated measurements with only one stop. 5.4 noise unit in case the user wants to improve the measuring results by averaging it is necessary that the values do not always display exactly the same time difference. instead the user should provide some noise so that different quantization steps of the characteristic curve of the tdc are involved. this can not happen with very constant time differences. one would constantly hit the same lsb. the noise unit enables the use of weighted averaging even for constant time differences. the noise unit adds a random offset to the start. it is dedicated to applications where the tdc gets a dummy start and measures the time difference between stop1 and stop2 (e.g. laser range finders). the noise unit is switched on by setting register 5, bit 28, en_startnoise = 1 member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 5-8 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 5.5 emc measures regarding the emc susceptibility, there are measures we can recommend: ? most importantly: the housing of the spool-piece must be connected to the electrical gnd signal of the pcb ? using ferrite cores with ~ 100 ohm @ 100 mhz with a low dc resistance, e.g. murata - blm18eg101tn1d - ferrite bead (impedance: 100 ohm, dc resistance max: 0.045 ohm, dc current rating: 200 0 ma, ferrite case style: 0603) ? using capacitors (value = 1 nf ) between fire outputs and gnd ? using a shielded cable ? common mode chokes are not needed with these measures, we usually see significant improvement. please make sure that the capacitors are of c0g type. use no other types. values up to 2.2 nf should work without too big disturbance on the measurement result. emc protection of transducer (acam-messelectronic gmbh) figure 5.4 member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 6-1 6 applications 6.1 ultrasonic heat meter the TDC-GP22 is perfectly suited for low-cost ultrasonic heat meter designs. thanks to the implemented functionality, including precision temperature measurement, fire pulse generat or , analog switches, comparator, windowing and clock calibration, it is sufficient to add a simple microprocessor (without a/d converter). the final circuit reaches a unknown level in compactness and small size. the following diagram shows the front end section of a typical ultrasonic heat meter as it might look like when TDC-GP22 is used. figure 6.1 the red parts illustrate the external components needed. the number is reduced to a minimum: ? in the ultrasonic path, the piezo transducers are connected through pairs of r and c. member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 6-2 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de ? in the temperature path only a temperature stable reference resistor and a capacitor ? as oscillators take a 32.768 khz and a ceramic 4 mhz oscillator. the fire_in pin can be used as output driver for the 32.768 khz clock, so the p does not need a low power oscillator. ? for the power supply use separate bypass capacitors of sufficient size to block v cc and v io . separate both by a small resistor. in total 11 low-cost elements only are needed for the measurement. register value typical example configuration register 0 ha30b6800 anz_fire = 10 (see register 6, too) div_fire = 3, f ire pulse frequency = 4 mhz/4 = 1.0 mhz anz_per_calres = 0, the 4 mhz is calibrated by a 61.035 s measurement div_clkhs = 0, the 4 mhz ceramic oscillator is internally used as it is start_clkhs = 2, the ceramic oscillator has 480 s to settle anz_port = 1, use all 4 ports for the temperature me asurement tcycle = 1, 512 s cycle time for the temperature measurement anz_fake = 0, 2 fake measurements sel_eclk_tmp = 1, use 4 mhz for the temperature measurement cycle definition calibrate = 1, mandatory in measurement mode 2 to be on no_cal_auto = 0, mandatory in measurement mode 2 to have auto - calibration messb2 = 1, switch on measurement mode 2 for measuring > 2 s. neg_stop/neg _ start = 0, all set to rising edges id0 = h00 register 1 h21444000 hit2 = 2, hit1 = 1: calculate 1. stop - start in measurement mode 2 en_fast_i nit = 0, off hitin2 = 0 hitin1 = 4, measure 3 stops (in measurement mode 2 this includes the start, too, giving 4 hits) curr32k = 0, use default sel_start_fire = 1, use the inter n al direct wiring from the f ire pulse buffer to the tdc start sel_tsto2 = 0, en_start active sel_tsto1 = 0, fire_in pin is used as fire in id1 = h00 register 2 ha0230000 en_int = b0101, interrupt given by timeout tdc or alu ready rfedge1 = rfedge2 = 0, use only rising edges delval1 = 8960, the first stop is accepted after 70 s id2 = h00 register 3 hd 0a248 00 en_autocalc _mb2 = 1, automatic calculation of the sum of res_0, res_1 and res_2. this calculation does not increase the address pointer. en_first _wave = 1, first hit detection mechanism is enabled en_err_val = 0, there is enough time to read the status register sel_timo_mb2 = 2 , time out is generated after 1024 s delrel1 = 8, delrel2 = 9 , delrel3 = 10 , measure the 8th , 9th and 10 th stop after the first hit member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 6-3 id3 = h00 register 4 h20004a00 dis_pw = 0, pulse width measurement is not disabled edge_pw = 0, pulse width measured on rising edge offsrng1 = 0, no negative offset offsrng2 = 1, offs = 10: total off set = 20 mv + 10 mv = 30 mv id4 = h00 register 5 h40000000 con_fire = 2, enable fire_up. if opcode start_tof_restart is used fire_up and fire_down are used alternately for up and down flow measurements. with the configuration described here the measurement cycle starts sending fire pulses at pin fire_up. en_startnoise = 0, switch off dis_phaseshift = 0, phase noise unit is active to improve the statistical behavior repeat_fire = 0, no sing - around phfire = 0, no ph a se change in the f ire pulse sequence id5 = h00 register 6 hc0c06000 en_analog = 1, use the internal analog circuit neg_stop_temp = 1, use the internal schmitt trigger for the temperature measurement da_korr = 0, offset is set in register 4 tw2 = 3, 300 s delay to charge up the capacitors of the highpass en_int = b0101, interrupt given by timeout tdc or alu ready (see also register 2 ) start_clkhs = 2, the ceramic oscillator has 480 s to settle (see also register 0) cycle_temp = 0, use factor 1.0 for the start_temp_restart cycle_tof = 0, use factor 1.0 for the delay between two t o f measurements hz60 = 0, 50 hz base fireo_def = 1, mandatory when using the internal analog circuit quad_res = 1, use 23 ps bin double_res = 0 temp_portdir = 0, standard order for t measurement anz_fire = 10 (see register 0, too) id6 = h00 member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 6-4 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de measurement flow: power - on reset: send so = h50 calibrate clock: send so = h03 start_cal_resonator check - loop intn = 0? send so = hb0, read si = res_0 correction factor = 61.035/res_0 measurement loop: temperature measurement, every 30 seconds: send so = h02 start_temp check - loop intn = 0? send so = hb4, read si = stat stat&h1e00 > 0: - > error routine send so = hb0, read si = res_0 send so = hb1, read si = res_1 send so = hb2, read si = res_2 send so = hb3, read si = res_3 rhot/rref = res_0/res_1 rcold/r ref = res_3/res_2 go to look - up table to get the temperature. time - of - flight measurement every half second: send so = h70 initialize tdc send so = h05 start_tof_restart check - loop intn = 0? ( tof _up ) send so = hb4, read si = stat stat&h0600 > 0: - > erro r routine, timeout = empty tube. send so = hb3, read si = res_3 send so = h70 initialize tdc check - loop intn = 0? (tof _down ) send so = hb4, read si = stat stat&h0600 > 0: - > error routine send so = hb3, read si = res_3 p can now start the data post - processing and calculate the flow and the heat. check signal strength via pulse width: send so = hb8, read si = pw1st if pw1st < 0.3 signal is too weak, alarm member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 7-1 7 miscellaneous 7.1 bug report 7.1.1 tdc -cal read error without quad resolution in case quad resolution is not set then reading separa te ly the tdc cal value will give a wrong read value. the internal calibration value is correct, but the transfer to the read register is not correct. therefore, measurement data are not affected. effect in measurement mode 2: - in this mode the cal value is for information only. further, quad resolution is recommended anyway. effect in measurement mode 1: - customers using auto calibration are not affected. - only customers that want to read uncalibrated data and do external calibration are affected. workaround: - the calibration data are not addressed directly after the calibration measurement but after the next regular measurement, before the next init. example: reg 1 = h21... reg 1 = h6 7 ... result0 = read(adr=0) cal = read(adr=1) init 7.1.2 timeout temperature measurement note: due to a bug it is necessary to have sel_timo_mb2 at 2ms to get a correct interrupt indication when 512 s cycle time is selected. 7.1.3 ti meout and pulse-width measurement problem: member of the ams group
u ltrasonic- f low- c onverter TDC-GP22 7-2 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de in case there is a timeout (e.g. because of air in the spool piece) the pulse -width measurement starts but does not end before there is an init. the cu rrent is increased by 500 a. the problem appears only with active pulse-width measurement. solutions: 1. it is mandatory to answer to any interrupt from TDC-GP22 by minimum an init command. even in case you know the next data are bad you need to send an init to stop the pulse-width measurement. also in case you do nt read the data. of course, timeout has to be selected as an interrupt source. 2. if pulse-width information is not used then switch off this unit. 7.2 last changes 02.11.2011 version 0.0 for release 27.01.2012 version 0.1 for release, sections 6 and 7 modified 29.03.2012 version 0.3 for release, 7.1.2 new, registers 1 and 4 corrected 24.05.2012 version 0.4. for release, page 2 - 6, page 3 - 7 26.06.2012 version 0.5. for release, page 7 - 1 and 7 - 2, section 7.1.3, page 2 - 9 package outline 15 .02.2013 version 0.6 for release 23.05.2013 version 0.7 correction status register (eeflags). smaller additions. 12 .11.2013 version 0.8 in measurement mode 2 tmin=700ns adapted; expands section 2.6 power supply, page 2 - 15; description en_analog (register 6) adds, page 3 - 12 description of the alu operation pointer adds; page 3 - 16; i mportant supplement to w rit ing the eeprom , page 3 - 18 ; e xpands section 4.4 first wave mode, page 4 - 19 description of the configuration of the fire pulse generator adds, page 5 - 6 add new s ection 5.5 emc measures, page 5 - 10 r evised the used registers , page 6 - 2; 13.03.2014 version 0.9: emc section corr e cted member of the ams group
TDC-GP22 acam messelectronic gmbh - friedrich-list-str.4 - 76297 stutensee - germany - www.acam.de 7-3 member of the ams group
acam - messelectronic gmbh friedrich - list - stra?e 4 76297 stutensee - blankenloch germany phone +49 7244 7419 C 0 fax +49 7244 7419 C 29 e - mail support@acam.de www.acam.de member of the ams group


▲Up To Search▲   

 
Price & Availability of TDC-GP22

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X